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

Why are range and zip assigned to themselves #8

Closed
evaherrada opened this issue Mar 4, 2020 · 6 comments
Closed

Why are range and zip assigned to themselves #8

evaherrada opened this issue Mar 4, 2020 · 6 comments

Comments

@evaherrada
Copy link
Collaborator

evaherrada commented Mar 4, 2020

Does anyone know why this is done? Pylint 2.x doesn't like it and although it appears like there were disables put in to ignore the issues caused by this, I wanted to check before adding another disable.

# pylint: disable=redefined-builtin, invalid-name
range = range
zip = zip

Referencing main issue: adafruit/Adafruit_CircuitPython_Bundle#232

@evaherrada
Copy link
Collaborator Author

@kattni

@evaherrada
Copy link
Collaborator Author

Also, these are all non top-level imports that pylint 2.x doesn't like. This wasn't changed by black and pylint 1.9.2 is fine with it. I assume this is to save on resources.

from adafruit_rsa.tools.pyasn1.codec.der import decoder
from adafruit_rsa.asn1 import AsnPubKey

from pyasn1.codec.der import encoder
from rsa.asn1 import AsnPubKey

from adafruit_rsa.asn1 import OpenSSLPubKey
from pyasn1.codec.der import decoder
from pyasn1.type import univ

from adafruit_rsa.tools.pyasn1.codec.der import decoder

from pyasn1.type import univ, namedtype
from pyasn1.codec.der import encoder

@evaherrada
Copy link
Collaborator Author

Personally, I think that we should either move these to top-level imports or just add a disable in each method that has such an import

@brentru
Copy link
Member

brentru commented Mar 4, 2020

@dherrada Let's try moving them to top-level imports.

@brentru
Copy link
Member

brentru commented Mar 4, 2020

@dherrada this may have been for Python2 compatibility within the python-rsa library which this is based on.

It's since been removed from their master branch's _compat.py:
sybrenstuvel/python-rsa@ded036c#diff-331cbe2ce57debdeab49e0d23b70d312L43

They can be removed, but will need to test prior to merging in to make sure it doesn't affect anything. Feel free to assign me to this.

@brentru
Copy link
Member

brentru commented Mar 17, 2020

This has been updated in #10 and merged into master. De-assigning then closing.

@brentru brentru removed their assignment Mar 17, 2020
@brentru brentru closed this as completed Mar 17, 2020
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

No branches or pull requests

2 participants