|
55 | 55 | __version__: str = "0.0.6"
|
56 | 56 | __email__: str = "[email protected]"
|
57 | 57 |
|
58 |
| -regex_main: str = re.compile(r"#\s*(pragma|PRAGMA)[:\s]?\s*(no|NO)\s*(cover|COVER)").pattern |
| 58 | +regex_main: str = re.compile(r"(?i)#\s*pragma[:\s]?\s*no\s*cover").pattern |
59 | 59 |
|
60 | 60 |
|
61 | 61 | class Version(NamedTuple):
|
@@ -106,25 +106,25 @@ def make_regexes(
|
106 | 106 | # We do it with re.compile to get the syntax highlighting in PyCharm
|
107 | 107 | excludes = [
|
108 | 108 | re.compile(
|
109 |
| - fr"{regex_main}\s*\((?=\s*<(py|PY|Py)3({'|'.join(less_than_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 109 | + fr"{regex_main}\s*\((?=\s*<py3({'|'.join(less_than_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
110 | 110 | ),
|
111 | 111 | re.compile(
|
112 |
| - fr"{regex_main}\s*\((?=\s*<=(py|PY|Py)3({'|'.join(less_equal_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 112 | + fr"{regex_main}\s*\((?=\s*<=py3({'|'.join(less_equal_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
113 | 113 | ),
|
114 | 114 | re.compile(
|
115 |
| - fr"{regex_main}\s*\((?=\s*>(py|PY|Py)3({'|'.join(greater_than_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 115 | + fr"{regex_main}\s*\((?=\s*>py3({'|'.join(greater_than_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
116 | 116 | ),
|
117 | 117 | re.compile(
|
118 |
| - fr"{regex_main}\s*\((?=\s*(py|PY|Py)3({'|'.join(greater_equal_versions)})\+){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 118 | + fr"{regex_main}\s*\((?=\s*py3({'|'.join(greater_equal_versions)})\+){wrong_platforms_string}{wrong_implementations_string}.*\)" |
119 | 119 | ),
|
120 | 120 | re.compile(
|
121 |
| - fr"{regex_main}\s*\((?=\s*>=(py|PY|Py)3({'|'.join(greater_equal_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 121 | + fr"{regex_main}\s*\((?=\s*>=py3({'|'.join(greater_equal_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
122 | 122 | ),
|
123 | 123 | re.compile(
|
124 |
| - fr"{regex_main}\s*\((?=\s*(py|PY|Py)3({'|'.join(exact_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 124 | + fr"{regex_main}\s*\((?=\s*py3({'|'.join(exact_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)" |
125 | 125 | ),
|
126 | 126 | re.compile(
|
127 |
| - fr"{regex_main}\s*\((?!.*(py|PY|Py)[0-9]+){wrong_platforms_string}{wrong_implementations_string}.*\)" |
| 127 | + fr"{regex_main}\s*\((?!.*py[0-9]+){wrong_platforms_string}{wrong_implementations_string}.*\)" |
128 | 128 | ),
|
129 | 129 | ]
|
130 | 130 |
|
@@ -184,7 +184,7 @@ def make_not_exclude_regexs(
|
184 | 184 |
|
185 | 185 | return [
|
186 | 186 | re.compile(
|
187 |
| - fr"{regex_main} (?!\(.*(.{{0,2}}(py|PY|Py)3\d(\+)?|!{current_platform}|!{current_implementation}).*\)).*$" |
| 187 | + fr"{regex_main} (?!\(.*(.{{0,2}}py3\d(\+)?|!{current_platform}|!{current_implementation}).*\)).*$" |
188 | 188 | ),
|
189 | 189 | re.compile(fr"{regex_main}$"),
|
190 | 190 | ]
|
|
0 commit comments