Skip to content

Commit c916340

Browse files
[pre-commit.ci] pre-commit autoupdate (#11269)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](PyCQA/flake8@6.0.0...6.1.0) - [github.com/asottile/pyupgrade: v3.9.0 → v3.10.1](asottile/pyupgrade@v3.9.0...v3.10.1) * Use is instead of type comparison with equal to appease the linter --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 485c555 commit c916340

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
language: python
3030
files: \.py$
3131
- repo: https://github.com/PyCQA/flake8
32-
rev: 6.0.0
32+
rev: 6.1.0
3333
hooks:
3434
- id: flake8
3535
language_version: python3
@@ -42,7 +42,7 @@ repos:
4242
- id: reorder-python-imports
4343
args: ['--application-directories=.:src', --py38-plus]
4444
- repo: https://github.com/asottile/pyupgrade
45-
rev: v3.9.0
45+
rev: v3.10.1
4646
hooks:
4747
- id: pyupgrade
4848
args: [--py38-plus]

src/_pytest/assertion/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def _compare_eq_any(left: Any, right: Any, verbose: int = 0) -> List[str]:
222222
other_side = right if isinstance(left, ApproxBase) else left
223223

224224
explanation = approx_side._repr_compare(other_side)
225-
elif type(left) == type(right) and (
225+
elif type(left) is type(right) and (
226226
isdatacls(left) or isattrs(left) or isnamedtuple(left)
227227
):
228228
# Note: unlike dataclasses/attrs, namedtuples compare only the

testing/_py/test_local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,4 +1573,4 @@ def test_default_encoding(self, tmpdir):
15731573
x.write_text(part, "ascii")
15741574
s = x.read_text("ascii")
15751575
assert s == part
1576-
assert type(s) == type(part)
1576+
assert type(s) is type(part)

0 commit comments

Comments
 (0)