@@ -66,7 +66,11 @@ class Version(NamedTuple):
66
66
serial : str
67
67
68
68
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 ]:
70
74
"""
71
75
Generate a list of regular expressions to match all valid ignores for the given Python version.
72
76
@@ -96,12 +100,24 @@ def make_regexes(version_tuple: Union["Version", "VersionInfo"], current_platfor
96
100
# Add regular expressions for relevant python versions
97
101
# We do it with re.compile to get the syntax highlighting in PyCharm
98
102
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
+ ),
105
121
]
106
122
107
123
return excludes
0 commit comments