Skip to content

Conversation

@SalehDehqanpour
Copy link

fix(#51): reset the cursor position of stream so be idempotent and transparent to users

"""
try:
obj = obj.read(_NUM_SIGNATURE_BYTES)
if type(obj) is IOBase:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@salehdeh76 Could you use if isinstance(obj, IOBase)

@SalehDehqanpour
Copy link
Author

@dosas I fixed it. Please review it again. Thanks

@dosas
Copy link

dosas commented Dec 26, 2020

@salehdeh76 Did you see this PR https://github.com/h2non/filetype.py/pull/51/files ?

There is already an open question?

Also, a unit test is always a plus :D

@guigarfr
Copy link

This problem was solved in #137 and merged. You can close the PR @h2non @salehdeh76

@h2non h2non closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants