File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def lru_cache(maxsize=128): # noqa as it's a fake implementation.
169
169
'while' ,
170
170
)))
171
171
)
172
- DUNDER_REGEX = re .compile (r' ^__([^\s]+)__ = ' )
172
+ DUNDER_REGEX = re .compile (r" ^__([^\s]+)__(?::\s*[a-zA-Z.0-9_\[\]\"]+)? = " )
173
173
MATCH_CASE_REGEX = re .compile (r'^\s*\b(?:match|case)(\s*)(?=.*\:)' )
174
174
BLANK_EXCEPT_REGEX = re .compile (r"except\s*:" )
175
175
Original file line number Diff line number Diff line change @@ -28,3 +28,17 @@ def f3(
28
28
#: E225:1:18
29
29
if False or (x := 1 ):
30
30
pass
31
+ #: Okay
32
+ import typing as t
33
+
34
+ __all__ : t .List [str ] = []
35
+
36
+ import logging
37
+
38
+ logging .getLogger (__name__ )
39
+ #: E402
40
+ import typing as t
41
+
42
+ all_the_things : t .List [str ] = []
43
+
44
+ import logging
You can’t perform that action at this time.
0 commit comments