Skip to content

Commit 1cebd3f

Browse files
authored
chore(deps): update all dev deps (#268)
1 parent d295b41 commit 1cebd3f

File tree

9 files changed

+1951
-550
lines changed

9 files changed

+1951
-550
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All contributions are greatly appreciated! Before contributing, please read the
66

77
This project uses [Poetry][] to manage dependencies and builds, and you will need to install it before working on Decoy.
88

9-
Once Poetry is installed, you should be good to set up a virtual environment and install development dependencies. Python 3.11 is recommended for development.
9+
Once Poetry is installed, you should be good to set up a virtual environment and install development dependencies. Python >=3.10 is recommended for development.
1010

1111
```bash
1212
git clone https://github.com/mcous/decoy.git

decoy/warning_checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _check_no_redundant_verify(all_calls: Sequence[AnySpyEvent]) -> None:
9090
verify_rehearsals = [c for c in all_calls if isinstance(c, VerifyRehearsal)]
9191

9292
for vr in verify_rehearsals:
93-
if any(wr for wr in when_rehearsals if wr == vr):
93+
if any(wr for wr in when_rehearsals if wr == vr): # type: ignore[comparison-overlap]
9494
_warn(RedundantVerifyWarning(rehearsal=vr))
9595

9696

docs/usage/errors-and-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ E AssertionError: assert None == 'good job'
119119

120120
The test failed, which is good! But, the developer's next steps to fix the error aren't immediately obvious.
121121

122-
Your first reaction, especially if you're coming from a mocking library like [unittest.mock][], might be "We need to add an assertion that `data_getter.get` was called correctly." This would be bad, though! See [RedundantVerifyWarning](#RedundantVerifyWarning) below for why adding an assertion like this would be redundant and potentially harmful.
122+
Your first reaction, especially if you're coming from a mocking library like [unittest.mock][], might be "We need to add an assertion that `data_getter.get` was called correctly." This would be bad, though! See [RedundantVerifyWarning](#redundantverifywarning) below for why adding an assertion like this would be redundant and potentially harmful.
123123

124124
Even if we shouldn't add an assertion, we still want something to help us find the underlying issue. This is where `MiscalledStubWarning` comes in. When this test is run, Decoy will print the following warnings:
125125

poetry.lock

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

pyproject.toml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,55 @@ classifiers = [
2525
python = "^3.7"
2626

2727
[tool.poetry.group.dev.dependencies]
28-
poethepoet = "0.19.0"
28+
poethepoet = [
29+
{ version = "0.19.0", python = "<3.8" },
30+
{ version = "0.30.0", python = ">=3.8, <3.9" },
31+
{ version = "0.35.0", python = ">=3.9" },
32+
]
2933

3034
[tool.poetry.group.test.dependencies]
31-
coverage = { version = "7.2.7", extras = ["toml"] }
35+
coverage = [
36+
{ version = "7.2.7", extras = [
37+
"toml",
38+
], python = "<3.8" },
39+
{ version = "7.6.1", extras = [
40+
"toml",
41+
], python = ">=3.8, <3.9" },
42+
{ version = "7.9.1", extras = [
43+
"toml",
44+
], python = ">=3.9" },
45+
]
3246
mypy = [
3347
{ version = "1.4.1", python = "<3.8" },
34-
{ version = "1.5.0", python = ">=3.8" },
48+
{ version = "1.14.1", python = ">=3.8, <3.9" },
49+
{ version = "1.16.0", python = ">=3.9" },
50+
]
51+
pytest = [
52+
{ version = "7.4.4", python = "<3.8" },
53+
{ version = "8.3.5", python = ">=3.8, <3.9" },
54+
{ version = "8.4.0", python = ">=3.9" },
55+
]
56+
pytest-asyncio = [
57+
{ version = "0.21.2", python = "<3.8" },
58+
{ version = "0.24.0", python = ">=3.8, <3.9" },
59+
{ version = "1.0.0", python = ">=3.9" },
60+
]
61+
pytest-mypy-plugins = [
62+
{ version = "2.0.0", python = "<3.8" },
63+
{ version = "3.1.2", python = ">=3.8, <3.9" },
64+
{ version = "3.2.0", python = ">=3.9" },
65+
]
66+
pytest-xdist = [
67+
{ version = "3.5.0", python = "<3.8" },
68+
{ version = "3.6.1", python = ">=3.8, <3.9" },
69+
{ version = "3.7.0", python = ">=3.9" },
3570
]
36-
pytest = "7.4.0"
37-
pytest-asyncio = "0.21.1"
38-
pytest-mypy-plugins = "2.0.0"
39-
pytest-xdist = "3.5.0"
40-
ruff = "0.11.0"
71+
ruff = "0.11.13"
4172

4273
[tool.poetry.group.docs.dependencies]
43-
mkdocs = { version = "1.5.3", python = ">=3.8" }
44-
mkdocs-material = { version = "9.4.8", python = ">=3.8" }
45-
mkdocstrings = { version = "0.23.0", extras = ["python"], python = ">=3.8" }
74+
mkdocs = { version = "1.6.1", python = ">=3.10" }
75+
mkdocs-material = { version = "9.6.14", python = ">=3.10" }
76+
mkdocstrings = { version = "0.29.1", extras = ["python"], python = ">=3.10" }
4677

4778
[tool.poe.tasks]
4879
all = [

tests/test_pytest_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_decoy(decoy):
1515
"""
1616
)
1717

18-
result = testdir.runpytest()
18+
result = testdir.runpytest_subprocess()
1919

2020
# check that all 4 tests passed
2121
result.assert_outcomes(passed=1)

tests/test_spy_log.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_push_and_consume_when_rehearsal() -> None:
2828
result = subject.consume_when_rehearsal(ignore_extra_args=False)
2929

3030
assert isinstance(result, WhenRehearsal)
31-
assert call == result
31+
assert call == result # type: ignore[comparison-overlap]
3232

3333

3434
def test_push_and_consume_when_rehearsal_ignore_extra_args() -> None:
@@ -58,7 +58,7 @@ def test_push_and_consume_prop_rehearsal_for_when() -> None:
5858
subject.push(event)
5959
result = subject.consume_when_rehearsal(ignore_extra_args=False)
6060
assert isinstance(result, WhenRehearsal)
61-
assert result == event
61+
assert result == event # type: ignore[comparison-overlap]
6262

6363

6464
def test_consume_when_rehearsal_raises_empty_error() -> None:
@@ -90,7 +90,7 @@ def test_push_and_consume_prop_rehearsal_for_prop() -> None:
9090
subject.push(event)
9191
result = subject.consume_prop_rehearsal()
9292
assert isinstance(result, PropRehearsal)
93-
assert result == event
93+
assert result == event # type: ignore[comparison-overlap]
9494

9595

9696
def test_consume_prop_rehearsal_raises_empty_error() -> None:

tests/typing/test_mypy_plugin.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# mypy plugin tests
22

33
- case: does_not_suppress_func_returns_value
4+
regex: yes
45
main: |
56
def noop() -> None:
67
pass
78
89
value = noop()
910
out: |
10-
main:4: error: "noop" does not return a value [func-returns-value]
11+
main:4: error: "noop" does not return a value .* \[func-returns-value]
1112
1213
- case: suppresses_func_returns_value_in_when
1314
main: |

tests/typing/test_typing.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
main:10: error: Argument 1 to "then_return" of "Stub" has incompatible type "str"; expected "int" [arg-type]
7575
7676
- case: context_manager_stub_mimics_enter_type
77-
skip: sys.version_info < (3, 7)
7877
main: |
7978
import contextlib
8079
from typing import Generator
@@ -94,7 +93,7 @@
9493
main:13: error: Argument 1 to "then_enter_with" of "Stub" has incompatible type "str"; expected "int" [arg-type]
9594
9695
- case: context_manager_stub_rejects_wrong_spec
97-
skip: sys.version_info < (3, 7)
96+
regex: yes
9897
main: |
9998
from decoy import Decoy
10099
@@ -109,10 +108,10 @@
109108
decoy.when(fake_any("hello")).then_enter_with(42)
110109
111110
out: |
112-
main:10: error: Invalid self argument "Stub[int]" to attribute function "then_enter_with" with type "Callable[[Stub[AbstractContextManager[ContextValueT]], ContextValueT], None]" [misc]
113-
main:10: error: No overload variant of "then_enter_with" of "Stub" matches argument type "int" [call-overload]
111+
main:10: error: Invalid self argument "Stub\[int]" to attribute function "then_enter_with" with type "Callable\[\[Stub\[.*ContextManager\[ContextValueT]], ContextValueT], None]" \[misc]
112+
main:10: error: No overload variant of "then_enter_with" of "Stub" matches argument type "int" \[call-overload]
114113
main:10: note: Possible overload variants:
115-
main:10: note: def then_enter_with(self, value: <nothing>) -> None
114+
main:10: note: def then_enter_with\(self, value.+\) -> None
116115
117116
- case: matchers_mimic_types
118117
main: |

0 commit comments

Comments
 (0)