Skip to content

Commit

Permalink
Fix: E721 do not compare types, for exact checks use 'is'/'is not', f…
Browse files Browse the repository at this point in the history
…or instance checks use isinstance()
  • Loading branch information
hugovk authored and claudep committed Oct 3, 2023
1 parent e97b462 commit 0f0ddf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tablib/packages/dbfpy/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def fromStream(cls, stream):
"""Return header object from the stream."""
stream.seek(0)
first_32 = stream.read(32)
if type(first_32) != bytes:
if not isinstance(first_32, bytes):
_data = bytes(first_32, sys.getfilesystemencoding())
_data = first_32
(_cnt, _hdrLen, _recLen) = struct.unpack("<I2H", _data[4:12])
Expand Down

0 comments on commit 0f0ddf6

Please sign in to comment.