diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1fadeece..efe72b8de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,25 +18,25 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.6.2 hooks: - id: ruff args: [--fix, --show-fixes] - repo: https://github.com/asottile/pyupgrade - rev: v3.16.0 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.13.0 + rev: v2.14.0 hooks: - id: pretty-format-toml args: [--autofix] diff --git a/src/uproot/behaviors/TH1.py b/src/uproot/behaviors/TH1.py index b9d24f7f1..3a256f325 100644 --- a/src/uproot/behaviors/TH1.py +++ b/src/uproot/behaviors/TH1.py @@ -71,7 +71,7 @@ def __eq__(self, other): Two histograms are equal if their axes are equal, their values are equal, and their variances are equal. """ - if type(self) != type(other): + if type(self) is not type(other): return False if self.axes != other.axes: return False diff --git a/src/uproot/interpretation/numerical.py b/src/uproot/interpretation/numerical.py index 241e35a67..1a978eeb9 100644 --- a/src/uproot/interpretation/numerical.py +++ b/src/uproot/interpretation/numerical.py @@ -518,7 +518,7 @@ def __repr__(self): def __eq__(self, other): return ( - type(self) == type(other) + type(self) is type(other) and self._low == other._low and self._high == other._high and self._num_bits == other._num_bits