Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#459)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
pre-commit-ci[bot] and adamchainz committed May 10, 2022
1 parent 3c456a0 commit 504b02d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Expand Up @@ -14,7 +14,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.0
rev: v2.32.1
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:
- flake8-tidy-imports
- flake8-typing-imports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
rev: v0.950
hooks:
- id: mypy
additional_dependencies:
Expand Down
9 changes: 3 additions & 6 deletions src/pytest_randomly/__init__.py
Expand Up @@ -135,7 +135,7 @@ def pytest_configure_node(self, node: Item) -> None:
node.workerinput["randomly_seed"] = seed # type: ignore [attr-defined]


random_states: dict[int, object] = {}
random_states: dict[int, tuple[Any, ...]] = {}
np_random_states: dict[int, Any] = {}


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

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

Expand Down

0 comments on commit 504b02d

Please sign in to comment.