Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
click.parser Namespace Reference

Classes

class  _Argument
 
class  _Option
 
class  _OptionParser
 
class  _ParsingState
 

Functions

tuple[cabc.Sequence[str|cabc.Sequence[str|None]|None], list[str]] _unpack_args (cabc.Sequence[str] args, cabc.Sequence[int] nargs_spec)
 
tuple[str, str] _split_opt (str opt)
 
str _normalize_opt (str opt, Context|None ctx)
 
object __getattr__ (str name)
 

Variables

 V = t.TypeVar("V")
 

Detailed Description

This module started out as largely a copy paste from the stdlib's
optparse module with the features removed that we do not need from
optparse because we implement them in Click on a higher level (for
instance type handling, help formatting and a lot more).

The plan is to remove more and more from here over time.

The reason this is a different module and not optparse from the stdlib
is that there are differences in 2.x and 3.x about the error messages
generated and optparse in the stdlib uses gettext for no good reason
and might cause us issues.

Click uses parts of optparse written by Gregory P. Ward and maintained
by the Python Software Foundation. This is limited to code in parser.py.

Copyright 2001-2006 Gregory P. Ward. All rights reserved.
Copyright 2002-2006 Python Software Foundation. All rights reserved.

Function Documentation

◆ _unpack_args()

tuple[cabc.Sequence[str | cabc.Sequence[str | None] | None], list[str]] click.parser._unpack_args ( cabc.Sequence[str]  args,
cabc.Sequence[int]   nargs_spec 
)
protected
Given an iterable of arguments and an iterable of nargs specifications,
it returns a tuple with all the unpacked arguments at the first index
and all remaining arguments as the second.

The nargs specification is the number of arguments that should be consumed
or `-1` to indicate that this position should eat up all the remainders.

Missing items are filled with ``UNSET``.