Skip to content

there is no configuration that allows six.moves #551

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

Closed
pylint-bot opened this issue Jun 11, 2015 · 3 comments
Closed

there is no configuration that allows six.moves #551

pylint-bot opened this issue Jun 11, 2015 · 3 comments
Labels

Comments

@pylint-bot
Copy link

Originally reported by: Buck Evan (BitBucket: bukzor, GitHub: @bukzor?)


I realize you've closed a similar issue lately, but it's still a bug that the "ignore" configurations don't cover this case. There are black-magical modules other than six, and they should have some small amount of support via configuration.

My versions:

$ ./.tox/py34/bin/python3.4 --version
Python 3.4.2

$ ./.tox/py34/bin/python3.4 -m pylint --version
__main__.py 1.4.3,
astroid 1.3.6, common 0.63.2
Python 3.4.2 (default, Oct 11 2014, 17:59:27)
[GCC 4.4.3]

My demo code:

import six
print(six.moves.urllib.parse.urlsplit(''))

from six import moves
print(moves.urllib.parse.urlsplit(''))

from six.moves import urllib
print(urllib.parse.urlsplit(''))

from six.moves.urllib import parse
print(parse.urlsplit(''))

from six.moves.urllib.parse import urlsplit
print(urlsplit(''))

Its output:

$ ./.tox/py34/bin/python3.4 demo.py
SplitResult(scheme='', netloc='', path='', query='', fragment='')
SplitResult(scheme='', netloc='', path='', query='', fragment='')
SplitResult(scheme='', netloc='', path='', query='', fragment='')
SplitResult(scheme='', netloc='', path='', query='', fragment='')
SplitResult(scheme='', netloc='', path='', query='', fragment='')

My pylintrc:

[TYPECHECK]
ignored-classes=
      pytest,
      RFC3986,
      _MovedItems,
      six,
      six.moves,
ignored-modules=
      six,
      six.moves,

The pylint report:

$ ./.tox/py34/bin/python3.4 -m pylint demo.py
************* Module demo
F:  7, 0: Unable to import 'six.moves' (import-error)
F: 10, 0: Unable to import 'six.moves.urllib' (import-error)
F: 13, 0: Unable to import 'six.moves.urllib.parse' (import-error)

@pylint-bot
Copy link
Author

Original comment by Buck Evan (BitBucket: bukzor, GitHub: @bukzor?):


There should be some combination of ignore-configuration that allows this file to lint cleanly.

@pylint-bot
Copy link
Author

Original comment by Buck Evan (BitBucket: bukzor, GitHub: @bukzor?):


Has #223 regressed again or is the fix not yet released?

@pylint-bot
Copy link
Author

Original comment by Buck Evan (BitBucket: bukzor, GitHub: @bukzor?):


OK https://bitbucket.org/logilab/pylint/commits/cd000904c9e2 hasn't been released yet, so this is just a dup of #223.

Sorry for noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant