I'm getting the following traceback from pylint, when trying to pylint an application using cpython 3.2:
<http://stackoverflow.com/questions/7300776/brodal-priority-queue-implementation> dstromberg@dstromberg-laptop~/src/home-svn/equivalence-classes/trunk/equivs3-python $ /usr/local/cpython-3.2/bin/pylint equivs3e No config file found, using default configuration Traceback (most recent call last): File "/usr/local/cpython-3.2/bin/pylint", line 4, in <module> lint.Run(sys.argv[1:]) File "/usr/local/cpython-3.2/lib/python3.2/site-packages/pylint/lint.py", line 879, in __init__ linter.check(args) File "/usr/local/cpython-3.2/lib/python3.2/site-packages/pylint/lint.py", line 502, in check self.check_astng_module(astng, walker, rawcheckers) File "/usr/local/cpython-3.2/lib/python3.2/site-packages/pylint/lint.py", line 564, in check_astng_module self.process_module(astng) File "/usr/local/cpython-3.2/lib/python3.2/site-packages/pylint/checkers/__init__.py", line 122, in process_module stream = node.file_stream File "/usr/local/cpython-3.2/lib/python3.2/site-packages/logilab/astng/scoped_nodes.py", line 249, in file_stream return file(self.file) NameError: global name 'file' is not defined This patch appears to fix the problem: --- scoped_nodes.py.t 2012-05-05 19:40:42.626527558 -0700 +++ scoped_nodes.py 2012-05-05 19:40:51.730572708 -0700 @@ -246,7 +246,7 @@ @property def file_stream(self): if self.file is not None: - return file(self.file) + return open(self.file, 'r') return None def block_range(self, lineno): -- Dan Stromberg
_______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects