[Python-apps-team] Bug#580637: pylint breaks if it has a configuration file (~/.pylintrc)

Thomas Nilsson thomas.nilsson at unixangst.com
Fri May 7 11:17:42 UTC 2010


Package: pylint
Version: 0.20.0-1
Severity: important
Tags: patch


Traceback (most recent call last):
  File "/usr/bin/pylint", line 4, in <module>
    lint.Run(sys.argv[1:])
  File "/usr/lib/pymodules/python2.5/pylint/lint.py", line 861, in __init__
    linter.load_config_file()
  File "/usr/lib/pymodules/python2.5/logilab/common/configuration.py", line 637, in load_config_file
    provider.set_option(option, value, optdict=optdict)
TypeError: set_option() got an unexpected keyword argument 'optdict'

Changing set_option function definitions from opt_dict=None to optdict=None
resolves this. I have not investigated if set_option could be provided
by anything outside of pylint.


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages pylint depends on:
ii  python                        2.5.4-9    An interactive high-level object-o
ii  python-logilab-astng          0.20.0-1   rebuild a new abstract syntax tree
ii  python-logilab-common         0.50.1-1   useful miscellaneous modules used 
ii  python-support                1.0.8      automated rebuilding support for P

Versions of packages pylint recommends:
ii  python-tk                     2.6.5-1    Tkinter - Writing Tk applications 

pylint suggests no packages.

-- debconf-show failed
-------------- next part --------------
--- checkers/similar.py.orig	2010-05-07 13:11:23.000000000 +0200
+++ checkers/similar.py	2010-05-07 13:11:37.000000000 +0200
@@ -248,12 +248,12 @@
                          ignore_comments=True, ignore_docstrings=True)
         self.stats = None
 
-    def set_option(self, opt_name, value, action=None, opt_dict=None):
+    def set_option(self, opt_name, value, action=None, optdict=None):
         """method called to set an option (registered in the options list)
 
         overridden to report options setting to Similar
         """
-        BaseChecker.set_option(self, opt_name, value, action, opt_dict)
+        BaseChecker.set_option(self, opt_name, value, action, optdict)
         if opt_name == 'min-similarity-lines':
             self.min_lines = self.config.min_similarity_lines
         elif opt_name == 'ignore-comments':
--- lint.py.orig	2010-05-07 13:08:00.000000000 +0200
+++ lint.py	2010-05-07 13:11:02.000000000 +0200
@@ -301,7 +301,7 @@
         self.reporter = reporter
         reporter.linter = self
 
-    def set_option(self, opt_name, value, action=None, opt_dict=None):
+    def set_option(self, opt_name, value, action=None, optdict=None):
         """overridden from configuration.OptionsProviderMixin to handle some
         special options
         """
@@ -322,7 +322,7 @@
             checkerids = [v.lower() for v in check_csv(None, opt_name, value)]
             self.enable_checkers(checkerids, opt_name == 'enable-checker')
         try:
-            BaseRawChecker.set_option(self, opt_name, value, action, opt_dict)
+            BaseRawChecker.set_option(self, opt_name, value, action, optdict)
         except UnsupportedAction:
             print >> sys.stderr, 'option %s can\'t be read from config file' % \
                   opt_name


More information about the Python-apps-team mailing list