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

Bump ruff from 0.0.278 to 0.0.284 #176

Merged
merged 3 commits into from
Aug 10, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mcproto/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def enable_encryption(self, shared_secret: bytes) -> None:
# subclass. This is needed since the cryptography library calls some C
# code in the back, which relies on this being bytes. If it's not a bytes
# instance, convert it.
if type(shared_secret) is not bytes:
if type(shared_secret) is not bytes: # noqa: E721 # we don't want isinstance
shared_secret = bytes(shared_secret)

self.encryption_enabled = True
Expand Down Expand Up @@ -169,7 +169,7 @@ def enable_encryption(self, shared_secret: bytes) -> None:
# subclass. This is needed since the cryptography library calls some C
# code in the back, which relies on this being bytes. If it's not a bytes
# instance, convert it.
if type(shared_secret) is not bytes:
if type(shared_secret) is not bytes: # noqa: E721 # we don't want isinstance
shared_secret = bytes(shared_secret)

self.encryption_enabled = True
Expand Down
4 changes: 2 additions & 2 deletions mcproto/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def encrypt_token_and_secret(
# of the bytes class, not any subclass. This is needed since the cryptography
# library calls some C code in the back, which relies on this being bytes. If
# it's not a bytes instance, convert it.
if type(verification_token) is not bytes:
if type(verification_token) is not bytes: # noqa: E721 # we don't want isinstance
verification_token = bytes(verification_token)
if type(shared_secret) is not bytes:
if type(shared_secret) is not bytes: # noqa: E721 # we don't want isinstance
shared_secret = bytes(shared_secret)

encrypted_token = public_key.encrypt(verification_token, PKCS1v15())
Expand Down
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pytest-cov = ">=3,<5"
pytest-httpx = { version = "^0.23.1", python = ">=3.9,<4" }

[tool.poetry.group.lint.dependencies]
ruff = "^0.0.278"
ruff = ">=0.0.278,<0.0.285"
black = ">=22.3,<24.0"
isort = "^5.10.1"
pyright = "^1.1.313"
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __getattribute__(self, __name: str) -> Any:
be delegated to the wrapped attribute. If the wrapped object doesn't have given attribute, the lookup
will fallback to regular lookup for variables belonging to this class.
"""
if __name == "_WRAPPED_ATTRIBUTE" or __name == self._WRAPPED_ATTRIBUTE:
if __name == "_WRAPPED_ATTRIBUTE" or __name == self._WRAPPED_ATTRIBUTE: # noqa: PLR1714 # Order is important
return super().__getattribute__(__name)

wrapped = getattr(self, self._WRAPPED_ATTRIBUTE)
Expand Down