summaryrefslogtreecommitdiff
path: root/scripts/dev/misc_checks.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-11-02 17:14:24 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-11-02 17:14:24 +0100
commitd5b08d1516048266c1f592288d4a0bf77863cd1f (patch)
treef100a39d64930a9f4ee0471935cadce5f0956c42 /scripts/dev/misc_checks.py
parent85544945b3a028b8fdb521b6deceb8d80131d87d (diff)
downloadqutebrowser-d5b08d1516048266c1f592288d4a0bf77863cd1f.tar.gz
qutebrowser-d5b08d1516048266c1f592288d4a0bf77863cd1f.zip
scripts: Add typing. check to misc_checks.py
Diffstat (limited to 'scripts/dev/misc_checks.py')
-rw-r--r--scripts/dev/misc_checks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py
index 5c09a9c9d..1ce9fdfe4 100644
--- a/scripts/dev/misc_checks.py
+++ b/scripts/dev/misc_checks.py
@@ -150,6 +150,10 @@ def check_spelling(args: argparse.Namespace) -> Optional[bool]:
re.compile(r'# type: (?!ignore\[)'),
"Don't use type comments, use type annotations instead.",
),
+ (
+ re.compile(r': typing\.'),
+ "Don't use typing.SomeType, do 'from typing import SomeType' instead.",
+ ),
]
# Files which should be ignored, e.g. because they come from another