Skip to content

Commit 3a51931

Browse files
committed
Tidied up formatting
1 parent e8a0ca1 commit 3a51931

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ repos:
3535
rev: v0.30.0
3636
hooks:
3737
- id: yapf
38+
exclude: ^(conf\.py|)$
3839

3940

4041
- repo: https://github.com/Lucas-C/pre-commit-hooks

coverage_pyver_pragma/__init__.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)