diff --git a/.pylintrc b/.pylintrc index 558b8d81..b020a379 100644 --- a/.pylintrc +++ b/.pylintrc @@ -33,17 +33,17 @@ load-plugins= # can either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). -disable=E0213 +disable=W0105,W0232,W0232,R0903,E0213,R0923,E0211 [REPORTS] # Set the output format. Available formats are text, parseable, colorized, msvs # (visual studio) and html -output-format=text +output-format=colorized # Include message's id in output -include-ids=no +include-ids=yes # Put messages in a separate file for each module / package specified on the # command line instead of printing them on stdout. Reports (if any) will be diff --git a/cement/core/arg.py b/cement/core/arg.py index 6eaba2c0..eaea7a82 100644 --- a/cement/core/arg.py +++ b/cement/core/arg.py @@ -7,10 +7,9 @@ from ..core import backend, interface, handler LOG = backend.minimal_logger(__name__) - +# pylint: disable=w0613 def argument_validator(klass, obj): """Validates a handler implementation against the IArgument interface.""" - members = [ '_setup', 'parse', @@ -19,7 +18,7 @@ def argument_validator(klass, obj): interface.validate(IArgument, obj, members) - +# pylint: disable=W0105,W0232,W0232,R0903,E0213,R0923 class IArgument(interface.Interface): """ This class defines the Argument Handler Interface. Classes that @@ -60,7 +59,8 @@ class IArgument(interface.Interface): :returns: None """ - + + # pylint: disable=E0211 def add_argument(*args, **kw): """ Add arguments for parsing. This should be -o/--option or positional. @@ -95,7 +95,7 @@ class IArgument(interface.Interface): """ - +# pylint: disable=W0105 class CementArgumentHandler(handler.CementBaseHandler): """Base class that all Argument Handlers should sub-class from.""" diff --git a/cement/core/backend.py b/cement/core/backend.py index 46a0edb1..5de4e638 100644 --- a/cement/core/backend.py +++ b/cement/core/backend.py @@ -1,12 +1,8 @@ """Cement core backend module.""" -import os import sys import logging -from ..core import exc - - def defaults(*sections): """ Returns a standard dictionary object to use for application defaults. diff --git a/cement/core/cache.py b/cement/core/cache.py index 42fca804..1a54ef19 100644 --- a/cement/core/cache.py +++ b/cement/core/cache.py @@ -1,6 +1,6 @@ """Cement core cache module.""" -from ..core import backend, exc, interface, handler +from ..core import backend, interface, handler LOG = backend.minimal_logger(__name__) @@ -99,6 +99,7 @@ class ICache(interface.Interface): """ + # pylint: disable=E0211 def purge(): """ Clears all data from the cache. diff --git a/cement/core/config.py b/cement/core/config.py index 5841c935..11371c9f 100644 --- a/cement/core/config.py +++ b/cement/core/config.py @@ -1,6 +1,6 @@ """Cement core config module.""" -from ..core import exc, backend, interface, handler +from ..core import interface, handler def config_validator(klass, obj): diff --git a/cement/core/controller.py b/cement/core/controller.py index 12325826..411926f3 100644 --- a/cement/core/controller.py +++ b/cement/core/controller.py @@ -136,6 +136,7 @@ class expose(object): print("In MyAppBaseController.my_command()") """ + # pylint: disable=W0622 def __init__(self, hide=False, help='', aliases=[]): self.hide = hide self.help = help @@ -150,7 +151,7 @@ class expose(object): self.func.aliases = self.aliases return self.func - +# pylint: disable=R0921 class CementBaseController(handler.CementBaseHandler): """ This is an implementation of the @@ -283,7 +284,7 @@ class CementBaseController(handler.CementBaseHandler): """ super(CementBaseController, self)._setup(app_obj) - if self._meta.description is None: + if getattr(self._meta, 'description', None) is None: self._meta.description = "%s Controller" % \ self._meta.label.capitalize()