From bcannon at gmail.com Mon Jun 9 21:52:48 2014 From: bcannon at gmail.com (Brett Cannon) Date: Mon, 09 Jun 2014 19:52:48 +0000 Subject: [code-quality] disable=all from a pylintrc file? Message-ID: I'm trying to whitelist checkers from a pylintrc file for pylint, but when I have: [MESSAGES CONTROL] disable=all enable=old-style-class nothing is outputted. When I comment out the `disable` line then everything is outputted. And if I set `disable` to something like `no-init` then that works, so I know the pylintrc file is working properly. How can I get the equivalent of --disable=all specified in a pylintrc file so I can select exactly what checkers I want to run? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.thenault at logilab.fr Tue Jun 10 10:17:35 2014 From: sylvain.thenault at logilab.fr (Sylvain =?utf-8?B?VGjDqW5hdWx0?=) Date: Tue, 10 Jun 2014 10:17:35 +0200 Subject: [code-quality] disable=all from a pylintrc file? In-Reply-To: References: Message-ID: <20140610081735.GB3044@logilab.fr> On 09 juin 19:52, Brett Cannon wrote: > I'm trying to whitelist checkers from a pylintrc file for pylint, but when > I have: > > [MESSAGES CONTROL] > disable=all > enable=old-style-class > > nothing is outputted. When I comment out the `disable` line then everything > is outputted. And if I set `disable` to something like `no-init` then that > works, so I know the pylintrc file is working properly. > > How can I get the equivalent of --disable=all specified in a pylintrc file > so I can select exactly what checkers I want to run? This is probably due to the following bug in logilab-common https://www.logilab.org/ticket/185648 hopefuly it's targeted for 0.62 which should be released soon. -- Sylvain Th?nault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations Python, Debian, M?th. Agiles: http://www.logilab.fr/formations D?veloppement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org From bcannon at gmail.com Tue Jun 10 15:29:48 2014 From: bcannon at gmail.com (Brett Cannon) Date: Tue, 10 Jun 2014 13:29:48 +0000 Subject: [code-quality] disable=all from a pylintrc file? References: <20140610081735.GB3044@logilab.fr> Message-ID: On Tue Jun 10 2014 at 4:17:38 AM, Sylvain Th?nault < sylvain.thenault at logilab.fr> wrote: > On 09 juin 19:52, Brett Cannon wrote: > > I'm trying to whitelist checkers from a pylintrc file for pylint, but > when > > I have: > > > > [MESSAGES CONTROL] > > disable=all > > enable=old-style-class > > > > nothing is outputted. When I comment out the `disable` line then > everything > > is outputted. And if I set `disable` to something like `no-init` then > that > > works, so I know the pylintrc file is working properly. > > > > How can I get the equivalent of --disable=all specified in a pylintrc > file > > so I can select exactly what checkers I want to run? > > This is probably due to the following bug in logilab-common > https://www.logilab.org/ticket/185648 > > hopefuly it's targeted for 0.62 which should be released soon. > Great! Then I will continue to move forward with my pylint explorations with the assumption that this will work at some point. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.thenault at logilab.fr Tue Jun 17 14:19:36 2014 From: sylvain.thenault at logilab.fr (Sylvain =?utf-8?B?VGjDqW5hdWx0?=) Date: Tue, 17 Jun 2014 14:19:36 +0200 Subject: [code-quality] ImportError: No module named paste In-Reply-To: <1400885200.14019.64.camel@loup.ece.ucsb.edu> References: <1400885200.14019.64.camel@loup.ece.ucsb.edu> Message-ID: <20140617121936.GN4876@logilab.fr> Hi, sorry for the late answer. I've added a ticket for your problem: http://www.logilab.org/ticket/253517. It seems related to https://bitbucket.org/logilab/pylint/issue/203/importing-namespace-packages-crashes. Thank you for the report. On 23 mai 15:46, kris kvilekval wrote: > > I am using pip to install all dependencies of new packages and am > running into a few issues (see error at end of email). > > The following patch seems to remove the issue. Not sure why imports of > names space packages had to be greater > than one, but it seems like pip installs namespaces differently than > easy_install did. > > > $ hg diff > diff --git a/modutils.py b/modutils.py > --- a/modutils.py > +++ b/modutils.py > @@ -612,11 +612,14 @@ > except AttributeError: > checkeggs = False > # pkg_resources support (aka setuptools namespace packages) > - if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1: > +# if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1: > + if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages:# > # setuptools has added into sys.modules a module object with proper > # __path__, get back information from there > module = sys.modules[modpath.pop(0)] > path = module.__path__ > + mtype = PKG_DIRECTORY > + mp_filename = path[0] > imported = [] > while modpath: > modname = modpath[0] > > > > ======================================================================= > > > > $ paver pylint bqserver/bq/module_service/controllers/module_server.py > ---> pavement.pylint > PYTHONPATH=bqcore/bq:bqserver/bq:bqengine/bq:bqfeature/bq pylint bqserver/bq/module_service/controllers/module_server.py --rcfile=bqcore/pylint.rc > ************* Module bq.module_service.controllers.module_server > I0011:330,0: Locally disabling dangerous-default-value (W0102) > Traceback (most recent call last): > File "/home/kgk/work/bisque/bq055/bqenv/bin/pylint", line 9, in > load_entry_point('pylint==1.2.1', 'console_scripts', 'pylint')() > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/__init__.py", line 21, in run_pylint > Run(sys.argv[1:]) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/lint.py", line 1051, in __init__ > linter.check(args) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/lint.py", line 626, in check > self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/lint.py", line 712, in check_astroid_module > walker.walk(astroid) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/utils.py", line 715, in walk > self.walk(child) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/utils.py", line 712, in walk > cb(astroid) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/checkers/imports.py", line 269, in visit_from > self._add_imported_module(node, '%s.%s' % (importedmodnode.name, name)) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/pylint/checkers/imports.py", line 302, in _add_imported_module > importedmodname = get_module_part(importedmodname) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/logilab/common/modutils.py", line 352, in get_module_part > path=path, context_file=context_file) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/logilab/common/modutils.py", line 297, in file_from_modpath > return _file_from_modpath(modpath, path, context) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/logilab/common/modutils.py", line 556, in _file_from_modpath > mtype, mp_filename = _module_file(modpath, path) > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/logilab/common/modutils.py", line 636, in _module_file > return _search_zip(modpath, pic)[:2] > File "/home/kgk/work/bisque/bq055/bqenv/lib/python2.6/site-packages/logilab/common/modutils.py", line 577, in _search_zip > raise ImportError('No module named %s' % '.'.join(modpath)) > ImportError: No module named paste > > > Captured Task Output: > > > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality > -- Sylvain Th?nault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations Python, Debian, M?th. Agiles: http://www.logilab.fr/formations D?veloppement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org