summaryrefslogtreecommitdiff
path: root/scripts/dev/misc_checks.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-11-02 17:08:33 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-11-02 17:09:19 +0100
commit33c80e386cee4dfa5db5d8eb2a25442fa8fb864c (patch)
tree3dd35bbc1bd500a7a6f28d8a43760bc7cd70e87e /scripts/dev/misc_checks.py
parent0487383836feb8d78e11bc4f863697069ec9ced2 (diff)
downloadqutebrowser-33c80e386cee4dfa5db5d8eb2a25442fa8fb864c.tar.gz
qutebrowser-33c80e386cee4dfa5db5d8eb2a25442fa8fb864c.zip
scripts: Disallow type comments in misc_checks
Diffstat (limited to 'scripts/dev/misc_checks.py')
-rw-r--r--scripts/dev/misc_checks.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py
index c8c1936e5..5c09a9c9d 100644
--- a/scripts/dev/misc_checks.py
+++ b/scripts/dev/misc_checks.py
@@ -145,7 +145,11 @@ def check_spelling(args: argparse.Namespace) -> Optional[bool]:
re.compile(r'# type: ignore[^\[]'),
("Don't use a blanket 'type: ignore', use something like "
"'type: ignore[error-code]' instead."),
- )
+ ),
+ (
+ re.compile(r'# type: (?!ignore\[)'),
+ "Don't use type comments, use type annotations instead.",
+ ),
]
# Files which should be ignored, e.g. because they come from another