Pylint fixes. Part of Issue #132

This commit is contained in:
BJ Dierkes 2012-09-07 16:44:08 -05:00
parent 9f8b6dc0c6
commit 6215478936
6 changed files with 14 additions and 16 deletions

View File

@ -33,17 +33,17 @@ load-plugins=
# can either give multiple identifier separated by comma (,) or put this option # 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 # multiple time (only on the command line, not in the configuration file where
# it should appear only once). # it should appear only once).
disable=E0213 disable=W0105,W0232,W0232,R0903,E0213,R0923,E0211
[REPORTS] [REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs # Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html # (visual studio) and html
output-format=text output-format=colorized
# Include message's id in output # 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 # 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 # command line instead of printing them on stdout. Reports (if any) will be

View File

@ -7,10 +7,9 @@ from ..core import backend, interface, handler
LOG = backend.minimal_logger(__name__) LOG = backend.minimal_logger(__name__)
# pylint: disable=w0613
def argument_validator(klass, obj): def argument_validator(klass, obj):
"""Validates a handler implementation against the IArgument interface.""" """Validates a handler implementation against the IArgument interface."""
members = [ members = [
'_setup', '_setup',
'parse', 'parse',
@ -19,7 +18,7 @@ def argument_validator(klass, obj):
interface.validate(IArgument, obj, members) interface.validate(IArgument, obj, members)
# pylint: disable=W0105,W0232,W0232,R0903,E0213,R0923
class IArgument(interface.Interface): class IArgument(interface.Interface):
""" """
This class defines the Argument Handler Interface. Classes that This class defines the Argument Handler Interface. Classes that
@ -60,7 +59,8 @@ class IArgument(interface.Interface):
:returns: None :returns: None
""" """
# pylint: disable=E0211
def add_argument(*args, **kw): def add_argument(*args, **kw):
""" """
Add arguments for parsing. This should be -o/--option or positional. 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): class CementArgumentHandler(handler.CementBaseHandler):
"""Base class that all Argument Handlers should sub-class from.""" """Base class that all Argument Handlers should sub-class from."""

View File

@ -1,12 +1,8 @@
"""Cement core backend module.""" """Cement core backend module."""
import os
import sys import sys
import logging import logging
from ..core import exc
def defaults(*sections): def defaults(*sections):
""" """
Returns a standard dictionary object to use for application defaults. Returns a standard dictionary object to use for application defaults.

View File

@ -1,6 +1,6 @@
"""Cement core cache module.""" """Cement core cache module."""
from ..core import backend, exc, interface, handler from ..core import backend, interface, handler
LOG = backend.minimal_logger(__name__) LOG = backend.minimal_logger(__name__)
@ -99,6 +99,7 @@ class ICache(interface.Interface):
""" """
# pylint: disable=E0211
def purge(): def purge():
""" """
Clears all data from the cache. Clears all data from the cache.

View File

@ -1,6 +1,6 @@
"""Cement core config module.""" """Cement core config module."""
from ..core import exc, backend, interface, handler from ..core import interface, handler
def config_validator(klass, obj): def config_validator(klass, obj):

View File

@ -136,6 +136,7 @@ class expose(object):
print("In MyAppBaseController.my_command()") print("In MyAppBaseController.my_command()")
""" """
# pylint: disable=W0622
def __init__(self, hide=False, help='', aliases=[]): def __init__(self, hide=False, help='', aliases=[]):
self.hide = hide self.hide = hide
self.help = help self.help = help
@ -150,7 +151,7 @@ class expose(object):
self.func.aliases = self.aliases self.func.aliases = self.aliases
return self.func return self.func
# pylint: disable=R0921
class CementBaseController(handler.CementBaseHandler): class CementBaseController(handler.CementBaseHandler):
""" """
This is an implementation of the This is an implementation of the
@ -283,7 +284,7 @@ class CementBaseController(handler.CementBaseHandler):
""" """
super(CementBaseController, self)._setup(app_obj) 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.description = "%s Controller" % \
self._meta.label.capitalize() self._meta.label.capitalize()