pylint-bot / pylint-unofficial

UNOFFICIAL playground for pylint github migration
0 stars 0 forks source link

Fatal error linting pygame on Python 3.4 #186

Closed pylint-bot closed 8 years ago

pylint-bot commented 10 years ago

Originally reported by: BitBucket: yoshi, GitHub: @yoshi?


System details:

test.py:

import pygame

print(pygame.__version__)
c:\>python test.py
1.9.2a0
c:\>pylint test.py
No config file found, using default configuration
************* Module test
C:  3, 0: Final newline missing (missing-final-newline)
C:  1, 0: Missing module docstring (missing-docstring)
Traceback (most recent call last):
  File "C:\Python34\Scripts\pylint-script.py", line 9, in <module>
    load_entry_point('pylint==1.1.0', 'console_scripts', 'pylint')()
  File "C:\Python34\lib\site-packages\pylint\__init__.py", line 21, in run_pylint
    Run(sys.argv[1:])
  File "C:\Python34\lib\site-packages\pylint\lint.py", line 1040, in __init__
    linter.check(args)
  File "C:\Python34\lib\site-packages\pylint\lint.py", line 626, in check
    self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
  File "C:\Python34\lib\site-packages\pylint\lint.py", line 712, in check_astroid_module
    walker.walk(astroid)
  File "C:\Python34\lib\site-packages\pylint\utils.py", line 697, in walk
    self.walk(child)
  File "C:\Python34\lib\site-packages\pylint\utils.py", line 694, in walk
    cb(astroid)
  File "C:\Python34\lib\site-packages\pylint\checkers\variables.py", line 540, in visit_import
    module = next(node.infer_name_module(parts[0]))
  File "C:\Python34\lib\site-packages\astroid\bases.py", line 307, in wrapped
    for res in _func(node, context, **kwargs):
  File "C:\Python34\lib\site-packages\astroid\inference.py", line 178, in infer_import
    yield self.do_import_module(name)
  File "C:\Python34\lib\site-packages\astroid\mixins.py", line 103, in do_import_module
    return mymodule.import_module(modname, level=level)
  File "C:\Python34\lib\site-packages\astroid\brain\py2gi.py", line 113, in _new_import_module
    return _orig_import_module(self, modname, relative_only, level)
  File "C:\Python34\lib\site-packages\astroid\scoped_nodes.py", line 339, in import_module
    return MANAGER.ast_from_module_name(absmodname)
  File "C:\Python34\lib\site-packages\astroid\manager.py", line 133, in ast_from_module_name
    return self.ast_from_file(filepath, modname, fallback=False)
  File "C:\Python34\lib\site-packages\astroid\manager.py", line 104, in ast_from_file
    return AstroidBuilder(self).file_build(filepath, modname)
  File "C:\Python34\lib\site-packages\astroid\builder.py", line 127, in file_build
    node = self.string_build(data, modname, path)
  File "C:\Python34\lib\site-packages\astroid\builder.py", line 133, in string_build
    module = self._data_build(data, modname, path)
  File "C:\Python34\lib\site-packages\astroid\builder.py", line 157, in _data_build
    module = rebuilder.visit_module(node, modname, package)
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 157, in visit_module
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 157, in <listcomp>
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 170, in visit
    return self._transform(visit_method(node, parent))
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 326, in visit_class
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 326, in <listcomp>
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 170, in visit
    return self._transform(visit_method(node, parent))
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 228, in visit_assign
    newnode.value = self.visit(node.value, newnode)
  File "C:\Python34\lib\site-packages\astroid\rebuilder.py", line 168, in visit
    visit_method = getattr(self, visit_name)
AttributeError: 'TreeRebuilder3k' object has no attribute 'visit_nameconstant'

pylint-bot commented 10 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):


For Python 3.4 you need the new 1.2 version, which will be released soon. Or just the astroid version from the repository.