diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-05-11 08:01:25 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-05-18 06:55:17 +0200 |
commit | a0d0b6464f29d4364da8c8962485ffa6725aeb4a (patch) | |
tree | e9db5dd0413d9d77c50572bf796d88921f059b7b /.pylintrc | |
parent | cdcd276a1a4409da9349f89e7d1cdb0567d952d3 (diff) | |
download | qutebrowser-a0d0b6464f29d4364da8c8962485ffa6725aeb4a.tar.gz qutebrowser-a0d0b6464f29d4364da8c8962485ffa6725aeb4a.zip |
Use typing.py-like annotations for command args
This means:
- An annotation like (int, str) is now typing.Union[int, str].
- utils.typing got expanded so it acts like the real typing.py, with
issubclass() working properly with typing.Union and __union_params__
being set.
- A literal string doesn't exist anymore as annotation, instead
@cmdutils.argument now has a 'choices' argument which can be used like
@cmdutils.argument('arg', choices=['val1', 'val2']).
- Argument validating/converting is now entirely handled by
argparser.type_conv instead of relying on python's argparse, i.e.
type/choices is now not passed to argparse anymore.
Diffstat (limited to '.pylintrc')
-rw-r--r-- | .pylintrc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -57,6 +57,9 @@ dummy-variables-rgx=_.* [DESIGN] max-args=10 +[CLASSES] +valid-metaclass-classmethod-first-arg=cls + [TYPECHECK] # MsgType added as WORKAROUND for # https://bitbucket.org/logilab/pylint/issues/690/ |