Skip to content

Commit

Permalink
Codechange: Use flake8 recommended way of doing type comparisons (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordAro authored Sep 12, 2023
1 parent c4ebb62 commit bfe999a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bananas_api/new_upload/session_validation.py
Original file line number Diff line number Diff line change
@@ -111,9 +111,9 @@ def validate_packet_size(session, package):
size += 1
for key, value in Classification().dump(session.get("classification")).items():
size += len(key) + 2
if type(value) == str:
if type(value) is str:
size += len(value) + 2
elif type(value) == bool:
elif type(value) is bool:
size += len("yes") + 2
else:
raise ValueError("Unknown type for classification value")

0 comments on commit bfe999a

Please sign in to comment.