File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,6 @@ def lru_cache(maxsize=128): # noqa as it's a fake implementation.
170170 )))
171171)
172172DUNDER_REGEX = re .compile (r"^__([^\s]+)__(?::\s*[a-zA-Z.0-9_\[\]\"]+)? = " )
173- MATCH_CASE_REGEX = re .compile (r'^\s*\b(?:match|case)(\s*)(?=.*\:)' )
174173BLANK_EXCEPT_REGEX = re .compile (r"except\s*:" )
175174
176175_checks = {'physical_line' : {}, 'logical_line' : {}, 'tree' : {}}
@@ -502,16 +501,6 @@ def whitespace_around_keywords(logical_line):
502501 elif len (after ) > 1 :
503502 yield match .start (2 ), "E271 multiple spaces after keyword"
504503
505- if sys .version_info >= (3 , 10 ):
506- match = MATCH_CASE_REGEX .match (logical_line )
507- if match :
508- if match [1 ] == ' ' :
509- return
510- if match [1 ] == '' :
511- yield match .start (1 ), "E275 missing whitespace after keyword"
512- else :
513- yield match .start (1 ), "E271 multiple spaces after keyword"
514-
515504
516505@register_check
517506def missing_whitespace_after_import_keyword (logical_line ):
Original file line number Diff line number Diff line change 2222 pass
2323 case (0 , 1 , * _):
2424 pass
25- #: E271:2:6 E271:3:9 E271:5:9 E271:7:9
26- var = 1
27- match var :
28- case 1 :
29- pass
30- case 2 :
31- pass
32- case (
33- 3
34- ):
35- pass
36- #: E275:2:6 E275:3:9 E275:5:9
37- var = 1
38- match (var ):
39- case (1 ):
40- pass
41- case_ :
42- pass
You can’t perform that action at this time.
0 commit comments