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

Fails with exception #25

Closed
nijel opened this issue Sep 25, 2014 · 3 comments
Closed

Fails with exception #25

nijel opened this issue Sep 25, 2014 · 3 comments

Comments

@nijel
Copy link
Contributor

nijel commented Sep 25, 2014

Running pylint with pylint-django on Travis CI suddently fails:

Traceback (most recent call last):

File "/home/travis/virtualenv/python2.7.8/bin/pylint", line 9, in <module>

load_entry_point('pylint==1.3.1', 'console_scripts', 'pylint')()

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/__init__.py", line 21, in run_pylint

Run(sys.argv[1:])

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 991, in __init__

linter.check(args)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 585, in check

self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/lint.py", line 662, in check_astroid_module

walker.walk(astroid)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/utils.py", line 804, in walk

self.walk(child)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint/utils.py", line 806, in walk

cb(astroid)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 54, in augment_func

augmentation(chain, node)

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_plugin_utils/__init__.py", line 118, in do_suppress

if test_func(node):

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_django/augmentations/__init__.py", line 203, in is_model_view_subclass_unused_argument

if not is_model_view_subclass_method_shouldnt_be_function(node):

File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/pylint_django/augmentations/__init__.py", line 195, in is_model_view_subclass_method_shouldnt_be_function

return parent.name.endswith('View') and node_is_subclass(parent, subclass)

AttributeError: 'NoneType' object has no attribute 'name'
@nijel
Copy link
Contributor Author

nijel commented Sep 25, 2014

The full build can be seen here: https://travis-ci.org/nijel/weblate/jobs/36255272

@nijel
Copy link
Contributor Author

nijel commented Sep 25, 2014

Looking at pylint-django code, the problem is probably that one of the modules defines get as a function, which then has parent set to None, but that's just my guess from reading https://github.com/landscapeio/pylint-django/blob/master/pylint_django/augmentations/__init__.py#L184

nijel added a commit to WeblateOrg/weblate that referenced this issue Sep 25, 2014
@carlio
Copy link
Collaborator

carlio commented Sep 25, 2014

0.5.3 is on PyPI now, hopefully it will fix this!

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