summaryrefslogtreecommitdiff
path: root/.pylintrc
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2016-05-11 08:01:25 +0200
committerFlorian Bruhin <git@the-compiler.org>2016-05-18 06:55:17 +0200
commita0d0b6464f29d4364da8c8962485ffa6725aeb4a (patch)
treee9db5dd0413d9d77c50572bf796d88921f059b7b /.pylintrc
parentcdcd276a1a4409da9349f89e7d1cdb0567d952d3 (diff)
downloadqutebrowser-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--.pylintrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/.pylintrc b/.pylintrc
index 4c64f485e..f5ef697a1 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -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/