Skip to content

Commit 504b02d

Browse files
[pre-commit.ci] pre-commit autoupdate (#459)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v2.32.0 → v2.32.1](asottile/pyupgrade@v2.32.0...v2.32.1) - [github.com/pre-commit/mirrors-mypy: v0.942 → v0.950](pre-commit/mirrors-mypy@v0.942...v0.950) * fix types Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adam Johnson <me@adamj.eu>
1 parent 3c456a0 commit 504b02d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/asottile/pyupgrade
17-
rev: v2.32.0
17+
rev: v2.32.1
1818
hooks:
1919
- id: pyupgrade
2020
args: [--py37-plus]
@@ -42,7 +42,7 @@ repos:
4242
- flake8-tidy-imports
4343
- flake8-typing-imports
4444
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v0.942
45+
rev: v0.950
4646
hooks:
4747
- id: mypy
4848
additional_dependencies:

src/pytest_randomly/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def pytest_configure_node(self, node: Item) -> None:
135135
node.workerinput["randomly_seed"] = seed # type: ignore [attr-defined]
136136

137137

138-
random_states: dict[int, object] = {}
138+
random_states: dict[int, tuple[Any, ...]] = {}
139139
np_random_states: dict[int, Any] = {}
140140

141141

@@ -166,11 +166,8 @@ def _reseed(config: Config, offset: int = 0) -> int:
166166
np_random.set_state(np_random_states[numpy_seed])
167167

168168
if entrypoint_reseeds is None:
169-
# typeshed missing correct types for latest importlib.metadata changes
170-
eps = entry_points(
171-
group="pytest_randomly.random_seeder", # type: ignore [call-arg]
172-
)
173-
entrypoint_reseeds = [e.load() for e in eps] # type: ignore [attr-defined]
169+
eps = entry_points(group="pytest_randomly.random_seeder")
170+
entrypoint_reseeds = [e.load() for e in eps]
174171
for reseed in entrypoint_reseeds:
175172
reseed(seed)
176173

0 commit comments

Comments
 (0)