Skip to content

Commit 2402b7e

Browse files
committed
Linting
1 parent c9be4dc commit 2402b7e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

coverage_pyver_pragma/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def make_regexes(
118118
re.compile(
119119
fr"{regex_main}\s*\((?=\s*(py|PY|Py)3({'|'.join(exact_versions)})){wrong_platforms_string}{wrong_implementations_string}.*\)"
120120
),
121-
re.compile(
122-
fr"{regex_main}\s*\({wrong_platforms_string}{wrong_implementations_string}.*\)"
123-
),
121+
re.compile(fr"{regex_main}\s*\({wrong_platforms_string}{wrong_implementations_string}.*\)"),
124122
]
125123

126124
print(excludes)
@@ -156,7 +154,11 @@ def configure(self, config: Any) -> None:
156154
# print(config.exclude_list)
157155

158156
# Reinstate the general regex, but making sure it isn't followed by a left bracket.
159-
config.exclude_list.append(re.compile(fr"{regex_main} (?!\(.*(.{{0,2}}(py|PY|Py)3\d(\+)?|!{platform.system()}|!{platform.python_implementation()}).*\)).*$").pattern)
157+
config.exclude_list.append(
158+
re.compile(
159+
fr"{regex_main} (?!\(.*(.{{0,2}}(py|PY|Py)3\d(\+)?|!{platform.system()}|!{platform.python_implementation()}).*\)).*$"
160+
).pattern
161+
)
160162

161163
# TODO: Python 4.X
162164

exclude_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file serves as a visual test that the conditional excludes are working correctly.
22

3+
# stdlib
34
import sys
45

56
print("This line should be excluded on Windows") # pragma: no cover (!Linux !Darwin)

0 commit comments

Comments
 (0)