Skip to content

Commit 0c88bc7

Browse files
[pre-commit.ci] pre-commit autoupdate (#3034)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](astral-sh/ruff-pre-commit@v0.5.1...v0.5.2) * Use `is` instead of `==` for type comparison --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: CoolCat467 <[email protected]>
1 parent 72f5931 commit 0c88bc7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
hooks:
2424
- id: black
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.5.1
26+
rev: v0.5.2
2727
hooks:
2828
- id: ruff
2929
types: [file]

src/trio/_core/_tests/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2704,7 +2704,7 @@ async def start_raiser() -> None:
27042704
else:
27052705
# Check attributes, not identity, because should_be_raiser_exc may be a
27062706
# copy of raiser_exc rather than raiser_exc by identity.
2707-
assert type(should_be_raiser_exc) == type(raiser_exc)
2707+
assert type(should_be_raiser_exc) is type(raiser_exc)
27082708
assert should_be_raiser_exc.message == raiser_exc.message
27092709
assert should_be_raiser_exc.exceptions == raiser_exc.exceptions
27102710

src/trio/_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def __init__(self) -> None:
528528
# make sure this __init__ works with multiple inheritance
529529
super().__init__()
530530
# and only raises error if it's directly constructed
531-
if type(self) == SocketType:
531+
if type(self) is SocketType:
532532
raise TypeError(
533533
"SocketType is an abstract class; use trio.socket.socket if you "
534534
"want to construct a socket object"

0 commit comments

Comments
 (0)