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

A couple pep2html.py issues #2080

Merged
merged 2 commits into from
Sep 21, 2021
Merged

A couple pep2html.py issues #2080

merged 2 commits into from
Sep 21, 2021

Conversation

DimitriPapadopoulos
Copy link
Contributor

Fixes a couple LGTM.com recommendations:
https://lgtm.com/projects/g/python/peps/?severity=recommendation

The "Testing equality to None" commit relates to PEP 0290 (Code Migration and Modernization):

Since there is only one None object, equality can be tested with identity. Identity tests are slightly faster than equality tests. Also, some object types may overload comparison, so equality testing may be much slower.

Pattern::

if v == None  -->  if v is None:
if v != None  -->  if v is not None:

Anyway, the existing code runs without errors, there is no need to fix this other than "modernization" of the code.

Testing for None should use the 'is' operator.
Import of 'misc' is not used.
Import of 'references' is not used.
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.

3 participants