] > AW: [Python-projects] Bug in pylint (when using --disable-msg) (Logilab.org)

Email AW: [Python-projects] Bug in pylint (when using --disable-msg)

to
subject
AW: [Python-projects] Bug in pylint (when using --disable-msg)
date
2005/02/25 09:26
The problem here seems to be a possible conflict with the old string module...
The parameter name 'string' in the get_csv() method should be replaced by something else, e.b. 'myString' to avoid possible naming conflicts with the old string module (and so additionally improve readability...).
If string module has been imported, string.split(',') would try to split the string ',' and result in [','] (which is a list...)

Best Regards / Mit freundlichen Grüßen
 
Gerhard Kring

>Siemens AG
>Communications
Com CD NI DB D

>St.-Martin-Str. 76
>D-81541 München
>Room: 5531/356
>                                                 
>T.+49-89-636-76219
>Mobile +49-178-7700355
        Email: Gerhard.Kring@siemens.com



-----Ursprüngliche Nachricht-----
Von: python-projects-bounces@www.logilab.org [mailto:python-projects-bounces@www.logilab.org] Im Auftrag von Fabio Zadrozny
Gesendet: Donnerstag, 24. Februar 2005 19:44
An: Sylvain
Cc: python-projects@logilab.org
Betreff: [Python-projects] Bug in pylint (when using --disable-msg)


Hi Sylvain,

I just upgraded to pylint 0.6.3 (commons 0.9.2) and running it against a 
simple file I get the error below:

Note that if I don't put the 
--disable-msg=W0103,W0131,C0103,W0312,W0511,W0232 option, it runs 
without any problems!

cheers,

Fabio

-------------
class C:
   
    def a(self):
        print self.b
---------------


[C:\bin\4NT]C:\bin\Python23\python.exe -u 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.py
dev\PySrc\ThirdParty\logilab\pylint\lint.py"  --include-ids=y 
--persistent=n --comment=n  --disable-
msg=W0103,W0131,C0103,W0312,W0511,W0232 --enable-design=n 
D:\dev_programs\eclipse_3\eclipse\runtime-
workbench-workspace\test\a\c\t2.py


No config file found, using default configuration
Traceback (most recent call last):
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\lint.py", line 749, in ?
    Run(sys.argv[1:])
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\lint.py", line 695, in __init__
    args = linter.load_command_line_configuration(args)
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\../../../ThirdParty\logilab\common\configuration.py", line 377, in 
load_command_line_configuration
    (options, args) = self._optik_parser.parse_args(args=args)
  File "c:\bin\Python23\lib\optparse.py", line 1124, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "c:\bin\Python23\lib\optparse.py", line 1164, in _process_args
    self._process_long_opt(rargs, values)
  File "c:\bin\Python23\lib\optparse.py", line 1239, in _process_long_opt
    option.process(opt, value, values, self)
  File "c:\bin\Python23\lib\optparse.py", line 611, in process
    return self.take_action(
  File "c:\bin\Python23\lib\optparse.py", line 630, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\../../../ThirdParty\logilab\common\configuration.py", line 299, in 
cb_set_provider_option
    self.global_set_option(opt_name, value)
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\../../../ThirdParty\logilab\common\configuration.py", line 303, in 
global_set_option
    self._all_options[opt_name].set_option(opt_name, value)
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\lint.py", line 283, in set_option
    for _id in get_csv(value):
  File 
"D:\dev_programs\eclipse_3\eclipse\workspace\org.python.pydev\PySrc\ThirdParty\logilab\pylint
\../../../ThirdParty\logilab\common\textutils.py", line 179, in get_csv
    return [word.strip() for word in string.split(sep) if word.strip()]
AttributeError: 'list' object has no attribute 'split'

-- 
Fabio Zadrozny
------------------------------------------------------
Software Developer
ESSS - Engineering Simulation and Scientific Software
www.esss.com.br

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects