Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #459

Merged
merged 2 commits into from May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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