Skip to content

Commit f51d102

Browse files
committed
Lint
1 parent a32dd92 commit f51d102

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

coincidence/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
__all__ = ("pytest_report_header", "PEP_563")
7676

7777

78-
def pytest_report_header(config) -> str: # noqa: MAN001
78+
def pytest_report_header(config) -> str: # noqa: MAN001,PRM002
7979
"""
8080
Prints the start time of the pytest session.
8181
"""

coincidence/regressions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _represent_pathlib(dumper: RegressionYamlDumper, data: pathlib.PurePath): #
127127
if not str(e).endswith("'yaml'"):
128128
raise
129129

130-
class DataRegressionFixture: # type: ignore[no-redef]
130+
class DataRegressionFixture: # type: ignore[no-redef] # noqa: PRM002
131131
"""
132132
Placeholder ``DataRegressionFixture`` for when PyYAML can't be imported.
133133
"""
@@ -290,7 +290,7 @@ class AdvancedFileRegressionFixture(FileRegressionFixture):
290290
.. versionadded:: 0.2.0
291291
""" # noqa: D400
292292

293-
def check( # type: ignore[override]
293+
def check( # type: ignore[override] # noqa: PRM002
294294
self,
295295
contents: Union[str, StringList],
296296
encoding: Optional[str] = "UTF-8",

coincidence/selectors.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ def only_function(reason: str = default_reason.format("Only")) -> MarkDecorator:
181181
only_function.__name__ = only_function.__qualname__ = f"only_{platform.lower()}"
182182
only_function.__module__ = module
183183
only_function.__doc__ = docstring.format(
184-
why="unless", platform=platform, versionadded_string=versionadded_string
184+
why="unless",
185+
platform=platform,
186+
versionadded_string=versionadded_string,
185187
)
186188

187189
return not_function, only_function
@@ -201,7 +203,7 @@ def only_function(reason: str = default_reason.format("Only")) -> MarkDecorator:
201203
not_linux, only_linux = platform_boolean_factory(
202204
condition=sys.platform == "linux",
203205
platform="Linux",
204-
versionadded="0.2.0"
206+
versionadded="0.2.0",
205207
)
206208
not_linux.__doc__ = f"""\
207209
{inspect.cleandoc(not_linux.__doc__ or '')}

coincidence/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def with_fixed_datetime(fixed_datetime: datetime.datetime) -> Iterator:
122122
fixed_datetime.year,
123123
fixed_datetime.month,
124124
fixed_datetime.day,
125-
)
125+
),
126126
)
127127
monkeypatch.setattr(
128128
datetime.datetime,
@@ -131,7 +131,7 @@ def with_fixed_datetime(fixed_datetime: datetime.datetime) -> Iterator:
131131
fixed_datetime.year,
132132
fixed_datetime.month,
133133
fixed_datetime.day,
134-
)
134+
),
135135
)
136136
monkeypatch.setattr(datetime.datetime, "now", lambda *args: fixed_datetime)
137137

tests/test_regressions.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,16 @@ def __len__(self) -> int:
9191
pytest.param(MappingProxyType({'a': 1, 'b': 2, 'c': 3}), id="MappingProxyType"),
9292
pytest.param(ChainMap({'a': 1}, {'b': 2}, {'c': 3}), id="ChainMap"),
9393
pytest.param(
94-
OrderedDict({'a': MappingProxyType({'a': 1})}), id="Nested_OrderedDict_MappingProxyType"
94+
OrderedDict({'a': MappingProxyType({'a': 1})}),
95+
id="Nested_OrderedDict_MappingProxyType",
9596
),
9697
pytest.param(
97-
OrderedDict({'a': CustomSequence([1, 2, 3])}), id="Nested_OrderedDict_CustomSequence"
98+
OrderedDict({'a': CustomSequence([1, 2, 3])}),
99+
id="Nested_OrderedDict_CustomSequence",
98100
),
99101
pytest.param(
100-
CustomSequence([MappingProxyType({'a': 1})]), id="Nested_CustomSequence_MappingProxyType"
102+
CustomSequence([MappingProxyType({'a': 1})]),
103+
id="Nested_CustomSequence_MappingProxyType",
101104
),
102105
pytest.param(CustomMapping({'a': Count(a=1, b=2, c=3)}), id="Nested_CustomMapping_NamedTuple"),
103106
pytest.param(toml.loads(some_toml)["section"]["table"], id="Toml_InlineTableDict"),

0 commit comments

Comments
 (0)