Skip to content

Commit

Permalink
update to latest dev deps
Browse files Browse the repository at this point in the history
includes ruff autofix for new starmap-zip rule
ref: https://docs.astral.sh/ruff/rules/starmap-zip/
  • Loading branch information
jab committed Feb 8, 2025
1 parent ba3bbda commit 03ece10
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 166 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ repos:
- id: remove-tabs

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
args: ["--uri-ignore-words-list", "*"] # https://github.com/codespell-project/codespell/issues/2473

- repo: https://github.com/crate-ci/typos
rev: dictgen-v0.3.1
rev: typos-dict-v0.12.4
hooks:
- id: typos
args: [--write-changes]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies:
- hypothesis
- pytest

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.5
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
Expand Down
3 changes: 1 addition & 2 deletions bidict/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from collections.abc import MutableMapping
from collections.abc import Reversible
from collections.abc import ValuesView
from itertools import starmap
from operator import eq
from types import MappingProxyType

Expand Down Expand Up @@ -307,7 +306,7 @@ def equals_order_sensitive(self, other: object) -> bool:
"""
if not isinstance(other, Mapping) or len(self) != len(other):
return False
return all(starmap(eq, zip(self.items(), other.items())))
return all(map(eq, self.items(), other.items()))

def _dedup(self, key: KT, val: VT, on_dup: OnDup) -> DedupResult[KT, VT]:
"""Check *key* and *val* for any duplication in self.
Expand Down
3 changes: 1 addition & 2 deletions tests/bidict_test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from dataclasses import dataclass
from itertools import chain
from itertools import combinations
from itertools import starmap

from bidict import DROP_NEW
from bidict import DROP_OLD
Expand Down Expand Up @@ -244,7 +243,7 @@ def move_to_end(self, key: KT, last: bool = True) -> None:


def zip_equal(i1: Iterable[t.Any], i2: Iterable[t.Any]) -> bool:
return all(starmap(operator.eq, zip(i1, i2)))
return all(map(operator.eq, i1, i2))


def invdict(d: dict[KT, VT]) -> dict[VT, KT]:
Expand Down
Loading

0 comments on commit 03ece10

Please # to comment.