Skip to content

Commit 1dc6abf

Browse files
chore(deps-dev): bump ruff from 0.0.276 to 0.0.284 (#216)
* chore(deps-dev): bump ruff from 0.0.276 to 0.0.284 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.276 to 0.0.284. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](astral-sh/ruff@v0.0.276...v0.0.284) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fixup: lint fixes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mike Cousins <mike@cousins.io>
1 parent 28a7a07 commit 1dc6abf

File tree

7 files changed

+46
-53
lines changed

7 files changed

+46
-53
lines changed

decoy/matchers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def __eq__(self, target: object) -> bool:
199199
for key, value in self._values.items():
200200
if is_match:
201201
try:
202-
is_match = key in target and target[key] == value # type: ignore[index,operator] # noqa: E501
202+
is_match = key in target and target[key] == value # type: ignore[index,operator]
203203
except TypeError:
204204
is_match = False
205205

decoy/verifier.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ def verify(
3333

3434
for i in range(len(calls)):
3535
calls_subset = calls[i : i + len(rehearsals)]
36-
matches = [
37-
match_event(c, r)
38-
for c, r in zip(calls_subset, rehearsals) # noqa: B905
39-
]
36+
matches = [match_event(c, r) for c, r in zip(calls_subset, rehearsals)]
4037

4138
if all(matches) and len(calls_subset) == len(rehearsals):
4239
match_count = match_count + 1

decoy/warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, rehearsal: VerifyRehearsal) -> None:
7979
"The same rehearsal was used in both a `when` and a `verify`.",
8080
"This is redundant and probably a misuse of the mock.",
8181
f"\t{stringify_call(rehearsal)}",
82-
"See https://mike.cousins.io/decoy/usage/errors-and-warnings/#redundantverifywarning", # noqa: E501
82+
"See https://mike.cousins.io/decoy/usage/errors-and-warnings/#redundantverifywarning",
8383
]
8484
)
8585
super().__init__(message)

poetry.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,18 @@ pytest = "7.4.0"
3636
pytest-asyncio = "0.21.1"
3737
pytest-mypy-plugins = "2.0.0"
3838
pytest-xdist = "3.3.1"
39-
ruff = "0.0.276"
39+
ruff = "0.0.284"
4040

4141
[tool.poe.tasks]
42-
all = [ "check", "lint", "format-check", "test-once", "coverage", "docs-build", "build" ]
42+
all = [
43+
"check",
44+
"lint",
45+
"format-check",
46+
"test-once",
47+
"coverage",
48+
"docs-build",
49+
"build",
50+
]
4351
check = "mypy"
4452
lint = "ruff check ."
4553
format = "black ."
@@ -51,8 +59,8 @@ coverage-xml = "coverage xml"
5159
docs = "mkdocs serve"
5260
docs-build = "mkdocs build"
5361
build = "poetry build"
54-
check-ci = [ "check", "lint", "format-check" ]
55-
test-ci = [ "test-once", "coverage-xml" ]
62+
check-ci = ["check", "lint", "format-check"]
63+
test-ci = ["test-once", "coverage-xml"]
5664
build-ci = ["docs-build", "build"]
5765

5866
[tool.poetry.plugins."pytest11"]
@@ -72,22 +80,10 @@ show_error_codes = true
7280
exclude_lines = ["@overload", "if TYPE_CHECKING:"]
7381

7482
[tool.ruff]
83+
target-version = "py37"
7584
extend-exclude = [".cache"]
76-
ignore = [
77-
"ANN101",
78-
"ANN102",
79-
"ANN401",
80-
"D107",
81-
]
82-
select = [
83-
"ANN",
84-
"B",
85-
"D",
86-
"E",
87-
"F",
88-
"RUF",
89-
"W",
90-
]
85+
select = ["ANN", "B", "D", "E", "F", "RUF", "W"]
86+
ignore = ["ANN101", "ANN102", "ANN401", "D107", "E501"]
9187

9288
[tool.ruff.pydocstyle]
9389
convention = "google"

tests/test_matchers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def goodbye(self) -> str:
2020
def test_any_matcher() -> None:
2121
"""It should have an "anything except None" matcher."""
2222
assert 1 == matchers.Anything()
23-
assert False == matchers.Anything() # noqa[E712]
23+
assert False == matchers.Anything() # noqa: E712
2424
assert {} == matchers.Anything()
2525
assert [] == matchers.Anything()
2626
assert ("hello", "world") == matchers.Anything()
@@ -30,7 +30,7 @@ def test_any_matcher() -> None:
3030
def test_is_a_matcher() -> None:
3131
"""It should have an "anything that is this type" matcher."""
3232
assert 1 == matchers.IsA(int)
33-
assert False == matchers.IsA(bool) # noqa[E712]
33+
assert False == matchers.IsA(bool) # noqa: E712
3434
assert {} == matchers.IsA(dict)
3535
assert [] == matchers.IsA(list)
3636
assert ("hello", "world") == matchers.IsA(tuple)
@@ -42,21 +42,21 @@ def test_is_a_matcher() -> None:
4242

4343

4444
def test_is_a_matcher_checks_instance(decoy: Decoy) -> None:
45-
"""The IsA matchers should respect ininstance logic."""
45+
"""The IsA matchers should respect isinstance logic."""
4646
target = decoy.mock(cls=SomeClass)
4747
assert target == matchers.IsA(SomeClass)
4848

4949

5050
def test_is_not_matcher() -> None:
5151
"""It should have an "anything that isn't this" matcher."""
5252
assert 1 == matchers.IsNot(2)
53-
assert False == matchers.IsNot(True) # noqa[E712]
53+
assert False == matchers.IsNot(True) # noqa: E712
5454
assert {} == matchers.IsNot({"hello": "world"})
5555
assert [] == matchers.IsNot(["hello", "world"])
5656
assert ("hello", "world") == matchers.IsNot(("hey", "there"))
5757

5858
assert 1 != matchers.IsNot(1)
59-
assert False != matchers.IsNot(False) # noqa[E712]
59+
assert False != matchers.IsNot(False) # noqa: E712
6060
assert {} != matchers.IsNot({})
6161
assert [] != matchers.IsNot([])
6262
assert ("hello", "world") != matchers.IsNot(("hello", "world"))
@@ -71,7 +71,7 @@ def test_has_attribute_matcher() -> None:
7171
assert {"hello": "world"} != matchers.HasAttributes({"hello": "world"})
7272
assert _HelloTuple("world") != matchers.HasAttributes({"goodbye": "so long"})
7373
assert 1 != matchers.HasAttributes({"hello": "world"})
74-
assert False != matchers.HasAttributes({"hello": "world"}) # noqa[E712]
74+
assert False != matchers.HasAttributes({"hello": "world"}) # noqa: E712
7575
assert [] != matchers.HasAttributes({"hello": "world"})
7676

7777

@@ -87,7 +87,7 @@ def test_dict_matching_matcher() -> None:
8787

8888
assert {"hello": "world"} != matchers.DictMatching({"goodbye": "so long"})
8989
assert 1 != matchers.DictMatching({"hello": "world"})
90-
assert False != matchers.DictMatching({"hello": "world"}) # noqa[E712]
90+
assert False != matchers.DictMatching({"hello": "world"}) # noqa: E712
9191
assert [] != matchers.DictMatching({"hello": "world"})
9292

9393

@@ -101,7 +101,7 @@ def test_error_matching_matcher() -> None:
101101
"""It should have an "any error that matches" matcher."""
102102
assert RuntimeError("ah!") == matchers.ErrorMatching(RuntimeError)
103103
assert RuntimeError("ah!") == matchers.ErrorMatching(RuntimeError, "ah")
104-
assert RuntimeError("ah!") != matchers.ErrorMatching(TypeError, "ah") # type: ignore[comparison-overlap] # noqa: E501
104+
assert RuntimeError("ah!") != matchers.ErrorMatching(TypeError, "ah") # type: ignore[comparison-overlap]
105105
assert RuntimeError("ah!") != matchers.ErrorMatching(RuntimeError, "ah$")
106106

107107

tests/test_warnings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class WarningSpec(NamedTuple):
112112
"The same rehearsal was used in both a `when` and a `verify`.",
113113
"This is redundant and probably a misuse of the mock.",
114114
"\tspy(1)",
115-
"See https://mike.cousins.io/decoy/usage/errors-and-warnings/#redundantverifywarning", # noqa: E501
115+
"See https://mike.cousins.io/decoy/usage/errors-and-warnings/#redundantverifywarning",
116116
]
117117
),
118118
),

0 commit comments

Comments
 (0)