Skip to content

Commit

Permalink
Add ignore flake8 rules instead of changing asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nameless committed Nov 27, 2024
1 parent 399fd43 commit c2af5c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_encrypted_cookie_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_app(


def decrypt(fernet: Fernet, cookie_value: str) -> Dict[str, Any]:
assert isinstance(cookie_value, str)
assert type(cookie_value) == str # noqa: E721
cookie_value = fernet.decrypt(cookie_value.encode("utf-8")).decode("utf-8")
return cast(Dict[str, Any], json.loads(cookie_value))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_nacl_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def create_app(


def decrypt(secretbox: nacl.secret.SecretBox, cookie_value: str) -> Any:
assert isinstance(cookie_value, str)
assert type(cookie_value) == str # noqa: E721
return json.loads(
secretbox.decrypt(cookie_value.encode("utf-8"), encoder=Base64Encoder).decode(
"utf-8"
Expand Down

0 comments on commit c2af5c5

Please sign in to comment.