mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
implicit_optional flag added and errors related to flag fixed
This commit is contained in:
parent
31c5b78e6a
commit
eb26c97ef7
1
mypy.ini
1
mypy.ini
@ -5,5 +5,6 @@ show_column_numbers = True
|
|||||||
pretty = True
|
pretty = True
|
||||||
show_error_codes = True
|
show_error_codes = True
|
||||||
warn_unused_configs =True
|
warn_unused_configs =True
|
||||||
|
no_implicit_optional = True
|
||||||
warn_redundant_casts = True
|
warn_redundant_casts = True
|
||||||
strict_equality = True
|
strict_equality = True
|
@ -707,12 +707,12 @@ def url_for_string(req, url_string):
|
|||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def get_arg(req: IRequest, argname: str | bytes, default: T = None, *, multiple: Literal[False] = False) -> T | bytes: ...
|
def get_arg(req: IRequest, argname: str | bytes, default: Optional[T] = None, *, multiple: Literal[False] = False) -> T | bytes: ...
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def get_arg(req: IRequest, argname: str | bytes, default: T = None, *, multiple: Literal[True]) -> T | tuple[bytes, ...]: ...
|
def get_arg(req: IRequest, argname: str | bytes, default: Optional[T] = None, *, multiple: Literal[True]) -> T | tuple[bytes, ...]: ...
|
||||||
|
|
||||||
def get_arg(req: IRequest, argname: str | bytes, default: T = None, *, multiple: bool = False) -> None | T | bytes | tuple[bytes, ...]:
|
def get_arg(req: IRequest, argname: str | bytes, default: Optional[T] = None, *, multiple: bool = False) -> None | T | bytes | tuple[bytes, ...]:
|
||||||
"""Extract an argument from either the query args (req.args) or the form
|
"""Extract an argument from either the query args (req.args) or the form
|
||||||
body fields (req.fields). If multiple=False, this returns a single value
|
body fields (req.fields). If multiple=False, this returns a single value
|
||||||
(or the default, which defaults to None), and the query args take
|
(or the default, which defaults to None), and the query args take
|
||||||
|
Loading…
Reference in New Issue
Block a user