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.
169169 'while' ,
170170 )))
171171)
172- DUNDER_REGEX = re .compile (r' ^__([^\s]+)__ = ' )
172+ DUNDER_REGEX = re .compile (r" ^__([^\s]+)__(?::\s*[a-zA-Z.0-9_\[\]\"]+)? = " )
173173MATCH_CASE_REGEX = re .compile (r'^\s*\b(?:match|case)(\s*)(?=.*\:)' )
174174BLANK_EXCEPT_REGEX = re .compile (r"except\s*:" )
175175
Original file line number Diff line number Diff line change @@ -28,3 +28,17 @@ def f3(
2828#: E225:1:18
2929if False or (x := 1 ):
3030 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