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

Fix a SyntaxWarning in Python 3.8+ #774

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

vEpiphyte
Copy link
Contributor

Python 3.8+ now produces a SyntaxWarning when identify checks are used with certain literals. This was documented in the 3.8 release notes here https://docs.python.org/3/whatsnew/3.8.html#porting-to-python-3-8

On import, the oletools package currently produces a such a warning message:

/usr/local/lib/python3.8/dist-packages/oletools/oleobj.py:581: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if idx is -1:

This PR changes the identify check to a equality check.

@vEpiphyte
Copy link
Contributor Author

Can this be included in 0.60.2 ?

@decalage2 decalage2 merged commit 6c61aca into decalage2:master Jan 6, 2023
@vEpiphyte vEpiphyte deleted the bug_syntax_warning branch January 6, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants