@@ -66,7 +66,11 @@ class Version(NamedTuple):
6666 serial : str
6767
6868
69- def make_regexes (version_tuple : Union ["Version" , "VersionInfo" ], current_platform : str , current_implementation : str ) -> List [Pattern ]:
69+ def make_regexes (
70+ version_tuple : Union ["Version" , "VersionInfo" ],
71+ current_platform : str ,
72+ current_implementation : str ,
73+ ) -> List [Pattern ]:
7074 """
7175 Generate a list of regular expressions to match all valid ignores for the given Python version.
7276
@@ -96,12 +100,24 @@ def make_regexes(version_tuple: Union["Version", "VersionInfo"], current_platfor
96100 # Add regular expressions for relevant python versions
97101 # We do it with re.compile to get the syntax highlighting in PyCharm
98102 excludes = [
99- re .compile (fr"{ regex_main } \s*\((?=\s*<(py|PY|Py)3({ '|' .join (less_than_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
100- re .compile (fr"{ regex_main } \s*\((?=\s*<=(py|PY|Py)3({ '|' .join (less_equal_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
101- re .compile (fr"{ regex_main } \s*\((?=\s*>(py|PY|Py)3({ '|' .join (greater_than_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
102- re .compile (fr"{ regex_main } \s*\((?=\s*(py|PY|Py)3({ '|' .join (greater_equal_versions )} )\+){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
103- re .compile (fr"{ regex_main } \s*\((?=\s*>=(py|PY|Py)3({ '|' .join (greater_equal_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
104- re .compile (fr"{ regex_main } \s*\((?=\s*(py|PY|Py)3({ '|' .join (exact_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)" ),
103+ re .compile (
104+ fr"{ regex_main } \s*\((?=\s*<(py|PY|Py)3({ '|' .join (less_than_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)"
105+ ),
106+ re .compile (
107+ fr"{ regex_main } \s*\((?=\s*<=(py|PY|Py)3({ '|' .join (less_equal_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)"
108+ ),
109+ re .compile (
110+ fr"{ regex_main } \s*\((?=\s*>(py|PY|Py)3({ '|' .join (greater_than_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)"
111+ ),
112+ re .compile (
113+ fr"{ regex_main } \s*\((?=\s*(py|PY|Py)3({ '|' .join (greater_equal_versions )} )\+){ wrong_platforms_string } { wrong_implementations_string } .*\)"
114+ ),
115+ re .compile (
116+ fr"{ regex_main } \s*\((?=\s*>=(py|PY|Py)3({ '|' .join (greater_equal_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)"
117+ ),
118+ re .compile (
119+ fr"{ regex_main } \s*\((?=\s*(py|PY|Py)3({ '|' .join (exact_versions )} )){ wrong_platforms_string } { wrong_implementations_string } .*\)"
120+ ),
105121 ]
106122
107123 return excludes
0 commit comments