diff options
| author | Barry Warsaw | 2011-08-03 23:01:06 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2011-08-03 23:01:06 -0400 |
| commit | fdb49295a5f859059f2b8d105d30e97f5b059e77 (patch) | |
| tree | 84bbd8097dc150cc089069761612ae0a47372d79 | |
| parent | 6b7f61df17382d29fcb4b403d4485d1d08481177 (diff) | |
| download | mailman-fdb49295a5f859059f2b8d105d30e97f5b059e77.tar.gz mailman-fdb49295a5f859059f2b8d105d30e97f5b059e77.tar.zst mailman-fdb49295a5f859059f2b8d105d30e97f5b059e77.zip | |
27 files changed, 0 insertions, 356 deletions
diff --git a/.buildout/bin/lint.sh.in b/.buildout/bin/lint.sh.in deleted file mode 100755 index cdcfcf1d2..000000000 --- a/.buildout/bin/lint.sh.in +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/bash - -export PYTHONPATH=${os-paths} -bin/pylint --rcfile=pylint.rc ${package} diff --git a/pylint.rc b/pylint.rc deleted file mode 100644 index 13031a15e..000000000 --- a/pylint.rc +++ /dev/null @@ -1,316 +0,0 @@ -# lint Python modules using external checkers. -# -# This is the main checker controlling the other ones and the reports -# generation. It is itself both a raw checker and an astng checker in order -# to: -# * handle message activation / deactivation at the module level -# * handle some basic but necessary stats'data (number of classes, methods...) -# -[MASTER] - -# Specify a configuration file. -#rcfile= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Profiled execution. -profile=no - -# Add <file or directory> to the black list. It should be a base name, not a -# path. You may set this option multiple times. -ignore=CVS - -# Pickle collected data for later comparisons. -persistent=no - -# Set the cache size for astng objects. -cache-size=500 - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - - -[MESSAGES CONTROL] - -# Enable only checker(s) with the given id(s). This option conflicts with the -# disable-checker option -#enable-checker= - -# Enable all checker(s) except those with the given id(s). This option -# conflicts with the enable-checker option -#disable-checker= - -# Enable all messages in the listed categories. -#enable-msg-cat= - -# Disable all messages in the listed categories. -#disable-msg-cat= - -# Enable the message(s) with the given id(s). -#enable-msg= - -# Disable the message(s) with the given id(s). -# C0103: *Invalid name %s* in module globals -# I0011: *Locally disabling %s* -# R0903: *Too few public methods* -# R0913: *Too many arguments* -# R0914: *Too many local variables* -# W0142: *Used * or ** magic* -# W0704: *Except doesn't do anything* -disable-msg=C0103,I0011,R0903,R0913,R0914,W0142,W0704 - - -[REPORTS] - -# Set the output format. Available formats are text, parseable, colorized, msvs -# (visual studio) and html -output-format=parseable - -# Include message's id in output -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 -# written in a file name "pylint_global.[txt|html]". -files-output=no - -# Tells wether to display a full report or only the messages -reports=no - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectivly contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (R0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Add a comment according to your evaluation note. This is used by the global -# evaluation report (R0004). -comment=no - -# Enable the report(s) with the given id(s). -#enable-report= - -# Disable the report(s) with the given id(s). -#disable-report= - - -# checks for : -# * doc strings -# * modules / classes / functions / methods / arguments / variables name -# * number of arguments, local variables, branchs, returns and statements in -# functions, methods -# * required module attributes -# * dangerous default values as arguments -# * redefinition of function / method / class -# * uses of the global statement -# -[BASIC] - -# Required attributes for module, separated by a comma -required-attributes= - -# Regular expression which should only match functions or classes name which do -# not require a docstring -no-docstring-rgx=__.*__ - -# Regular expression which should only match correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression which should only match correct module level names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression which should only match correct class names -class-rgx=[A-Z_][a-zA-Z0-9]+$ - -# Regular expression which should only match correct function names -function-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct method names -method-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct instance attribute names -attr-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct argument names -argument-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct variable names -variable-rgx=[a-z_][a-z0-9_]{2,30}$ - -# Regular expression which should only match correct list comprehension / -# generator expression variable names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Good variable names which should always be accepted, separated by a comma -good-names=i,j,k,ex,Run,_ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# List of builtins function names that should not be used, separated by a comma -bad-functions=map,filter,apply,input - - -# try to find bugs in the code using type inference -# -[TYPECHECK] - -# Tells wether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# List of classes names for which member attributes should not be checked -# (useful for classes with attributes dynamicaly set). -ignored-classes=SQLObject - -# When zope mode is activated, add a predefined set of Zope acquired attributes -# to generated-members. -zope=no - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E0201 when accessed. -generated-members=REQUEST,acl_users,aq_parent - - -# checks for -# * unused variables / imports -# * undefined variables -# * redefinition of variable from builtins or from an outer scope -# * use of variable before assigment -# -[VARIABLES] - -# Tells wether we should check for unused import in __init__ files. -init-import=no - -# A regular expression matching names used for dummy variables (i.e. not used). -dummy-variables-rgx=_|dummy - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - - -# checks for : -# * methods without self as first argument -# * overridden methods signature -# * access only to existant members via self -# * attributes not defined in the __init__ method -# * supported interfaces implementation -# * unreachable code -# -[CLASSES] - -# List of interface methods to ignore, separated by a comma. This is used for -# instance to not check methods defines in Zope's Interface base class. -ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - - -# checks for sign of poor/misdesign: -# * number of methods, attributes, local variables... -# * size, complexity of functions, methods -# -[DESIGN] - -# Maximum number of arguments for function / method -max-args=5 - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of return / yield for function / method body -max-returns=6 - -# Maximum number of branch for function / method body -max-branchs=12 - -# Maximum number of statements in function / method body -max-statements=50 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of attributes for a class (see R0902). -max-attributes=7 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=2 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=50 - - -# checks for -# * external modules dependencies -# * relative / wildcard imports -# * cyclic imports -# * uses of deprecated modules -# -[IMPORTS] - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=regsub,TERMIOS,Bastion,rexec - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report R0402 must not be disabled) -import-graph= - -# Create a graph of external dependencies in the given file (report R0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of internal dependencies in the given file (report R0402 must -# not be disabled) -int-import-graph= - - -# checks for : -# * unauthorized constructions -# * strict indentation -# * line length -# * use of <> instead of != -# -[FORMAT] - -# Maximum number of characters on a single line. -max-line-length=80 - -# Maximum number of lines in a module -max-module-lines=1000 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - - -# checks for: -# * warning notes in the code like FIXME, XXX -# * PEP 263: source code with non ascii character but no encoding declaration -# -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -notes=FIXME,XXX,TODO - - -# checks for similarities and duplicated code. This computation may be -# memory / CPU intensive, so you should disable it if you experiments some -# problems. -# -[SIMILARITIES] - -# Minimum lines number of a similarity. -min-similarity-lines=4 - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes diff --git a/src/mailman/__init__.py b/src/mailman/__init__.py index 0b911fec9..ed51320ba 100644 --- a/src/mailman/__init__.py +++ b/src/mailman/__init__.py @@ -41,7 +41,6 @@ except ImportError: # however, we'll initialize it differently for tests. We have to do it this # early so that module contents is set up before anything that needs it is # imported. -# pylint: disable-msg=E0611 if sys.argv[0].split(os.sep)[-1] == 'test': from mailman.testing.i18n import initialize else: diff --git a/src/mailman/app/lifecycle.py b/src/mailman/app/lifecycle.py index 689fab484..5ee943840 100644 --- a/src/mailman/app/lifecycle.py +++ b/src/mailman/app/lifecycle.py @@ -67,7 +67,6 @@ def create_list(fqdn_listname, owners=None): owners = [] # This raises I getUtility(IEmailValidator).validate(fqdn_listname) - # pylint: disable-msg=W0612 listname, domain = fqdn_listname.split('@', 1) if domain not in getUtility(IDomainManager): raise BadDomainSpecificationError(domain) diff --git a/src/mailman/bin/runner.py b/src/mailman/bin/runner.py index b19904aa7..6e25979be 100644 --- a/src/mailman/bin/runner.py +++ b/src/mailman/bin/runner.py @@ -42,7 +42,6 @@ log = None -# pylint: disable-msg=W0613 def r_callback(option, opt, value, parser): """Callback for -r/--runner option.""" dest = getattr(parser.values, option.dest) diff --git a/src/mailman/core/constants.py b/src/mailman/core/constants.py index 83bd91c55..a504b8498 100644 --- a/src/mailman/core/constants.py +++ b/src/mailman/core/constants.py @@ -35,10 +35,6 @@ from mailman.interfaces.preferences import IPreferences -# pylint: disable-msg=W0232 -# no class __init__() -# pylint: disable-msg=R0903 -# too few public methods class SystemDefaultPreferences: """The default system preferences.""" diff --git a/src/mailman/core/i18n.py b/src/mailman/core/i18n.py index e858a3b2a..4c898be2a 100644 --- a/src/mailman/core/i18n.py +++ b/src/mailman/core/i18n.py @@ -73,7 +73,6 @@ def ctime(date): _('Jul'), _('Aug'), _('Sep'), _('Oct'), _('Nov'), _('Dec') ] - # pylint: disable-msg=W0612 tzname = _('Server Local Time') if isinstance(date, str): try: @@ -107,7 +106,6 @@ def ctime(date): mon = i break else: - # pylint: disable-msg=W0612 year, mon, day, hh, mm, ss, wday, yday, dst = time.localtime(date) if dst in (0, 1): tzname = time.tzname[dst] diff --git a/src/mailman/interact.py b/src/mailman/interact.py index 758226ef7..1fb01946f 100644 --- a/src/mailman/interact.py +++ b/src/mailman/interact.py @@ -48,7 +48,6 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): # Populate the console's with the locals of the frame that called this # function (i.e. one up from here). if upframe: - # pylint: disable-msg=W0212 frame = sys._getframe(1) namespace.update(frame.f_globals) namespace.update(frame.f_locals) @@ -57,7 +56,6 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): interp = code.InteractiveConsole(namespace) # Try to import the readline module, but don't worry if it's unavailable. try: - # pylint: disable-msg=W0612 import readline except ImportError: pass @@ -66,7 +64,6 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): # than once, this could cause a problem. startup = os.environ.get('PYTHONSTARTUP') if startup: - # pylint: disable-msg=W0702 try: execfile(startup, namespace) except: diff --git a/src/mailman/model/domain.py b/src/mailman/model/domain.py index 89b071477..083246469 100644 --- a/src/mailman/model/domain.py +++ b/src/mailman/model/domain.py @@ -78,8 +78,6 @@ class Domain(Model): @property def url_host(self): """See `IDomain`.""" - # pylint: disable-msg=E1101 - # no netloc member; yes it does return urlparse(self.base_url).netloc @property diff --git a/src/mailman/model/listmanager.py b/src/mailman/model/listmanager.py index 851b52618..a7f302883 100644 --- a/src/mailman/model/listmanager.py +++ b/src/mailman/model/listmanager.py @@ -41,7 +41,6 @@ class ListManager: implements(IListManager) - # pylint: disable-msg=R0201 def create(self, fqdn_listname): """See `IListManager`.""" listname, at, hostname = fqdn_listname.partition('@') diff --git a/src/mailman/options.py b/src/mailman/options.py index 372c5fbf3..3d1119ff6 100644 --- a/src/mailman/options.py +++ b/src/mailman/options.py @@ -40,7 +40,6 @@ from mailman.version import MAILMAN_VERSION -# pylint: disable-msg=W0613 def check_unicode(option, opt, value): """Check that the value is a unicode string.""" if isinstance(value, unicode): @@ -52,7 +51,6 @@ def check_unicode(option, opt, value): 'option {0}: Cannot decode: {1}'.format(opt, value)) -# pylint: disable-msg=W0613 def check_yesno(option, opt, value): """Check that the value is 'yes' or 'no'.""" value = value.lower() diff --git a/src/mailman/pipeline/acknowledge.py b/src/mailman/pipeline/acknowledge.py index e5b49ffa0..cf52eb73f 100644 --- a/src/mailman/pipeline/acknowledge.py +++ b/src/mailman/pipeline/acknowledge.py @@ -40,7 +40,6 @@ from mailman.utilities.string import oneline -# pylint: disable-msg=W0232,R0201 class Acknowledge: """Send an acknowledgment.""" implements(IHandler) diff --git a/src/mailman/pipeline/after_delivery.py b/src/mailman/pipeline/after_delivery.py index a1f2cee19..5b447e919 100644 --- a/src/mailman/pipeline/after_delivery.py +++ b/src/mailman/pipeline/after_delivery.py @@ -34,7 +34,6 @@ from mailman.interfaces.handler import IHandler -# pylint: disable-msg=W0232,R0201,W0613 class AfterDelivery: """Perform some bookkeeping after a successful post.""" diff --git a/src/mailman/pipeline/avoid_duplicates.py b/src/mailman/pipeline/avoid_duplicates.py index c3a7b3274..ff30e2770 100644 --- a/src/mailman/pipeline/avoid_duplicates.py +++ b/src/mailman/pipeline/avoid_duplicates.py @@ -42,7 +42,6 @@ COMMASPACE = ', ' -# pylint: disable-msg=W0232,R0201 class AvoidDuplicates: """If the user wishes it, do not send duplicates of the same message.""" diff --git a/src/mailman/pipeline/calculate_recipients.py b/src/mailman/pipeline/calculate_recipients.py index d2527e608..fb866b042 100644 --- a/src/mailman/pipeline/calculate_recipients.py +++ b/src/mailman/pipeline/calculate_recipients.py @@ -41,7 +41,6 @@ from mailman.utilities.string import wrap -# pylint: disable-msg=W0232,R0201 class CalculateRecipients: """Calculate the regular (i.e. non-digest) recipients of the message.""" @@ -83,7 +82,6 @@ class CalculateRecipients: # Bad Urgent: password, so reject it instead of passing it on. # I think it's better that the sender know they screwed up # than to deliver it normally. - # pylint: disable-msg=W0612 realname = mlist.real_name text = _("""\ Your urgent message to the $realname mailing list was not authorized for diff --git a/src/mailman/pipeline/cleanse.py b/src/mailman/pipeline/cleanse.py index 1089e805b..7bf8512ac 100644 --- a/src/mailman/pipeline/cleanse.py +++ b/src/mailman/pipeline/cleanse.py @@ -39,7 +39,6 @@ log = logging.getLogger('mailman.post') -# pylint: disable-msg=W0232,R0201,W0613 class Cleanse: """Cleanse certain headers from all messages.""" diff --git a/src/mailman/pipeline/cleanse_dkim.py b/src/mailman/pipeline/cleanse_dkim.py index 7f98e19ca..5a64d7fb7 100644 --- a/src/mailman/pipeline/cleanse_dkim.py +++ b/src/mailman/pipeline/cleanse_dkim.py @@ -42,7 +42,6 @@ from mailman.interfaces.handler import IHandler -# pylint: disable-msg=W0232,R0201,W0613 class CleanseDKIM: """Remove DomainKeys headers.""" diff --git a/src/mailman/pipeline/cook_headers.py b/src/mailman/pipeline/cook_headers.py index 89e9a5663..7e7b2078b 100644 --- a/src/mailman/pipeline/cook_headers.py +++ b/src/mailman/pipeline/cook_headers.py @@ -347,7 +347,6 @@ def ch_oneline(headerstr): -# pylint: disable-msg=W0232,R0201 class CookHeaders: """Modify message headers.""" diff --git a/src/mailman/pipeline/decorate.py b/src/mailman/pipeline/decorate.py index fd3d14e3a..ea62591d6 100644 --- a/src/mailman/pipeline/decorate.py +++ b/src/mailman/pipeline/decorate.py @@ -217,7 +217,6 @@ def decorate(mlist, template, extradict=None): -# pylint: disable-msg=W0232,R0201 class Decorate: """Decorate a message with headers and footers.""" diff --git a/src/mailman/pipeline/file_recipients.py b/src/mailman/pipeline/file_recipients.py index 5cc7c7914..21b7a5929 100644 --- a/src/mailman/pipeline/file_recipients.py +++ b/src/mailman/pipeline/file_recipients.py @@ -35,7 +35,6 @@ from mailman.interfaces.handler import IHandler -# pylint: disable-msg=W0232,R0201,W0613 class FileRecipients: """Get the normal delivery recipients from an include file.""" diff --git a/src/mailman/pipeline/owner_recipients.py b/src/mailman/pipeline/owner_recipients.py index aa7948586..e0b72944f 100644 --- a/src/mailman/pipeline/owner_recipients.py +++ b/src/mailman/pipeline/owner_recipients.py @@ -26,7 +26,6 @@ __all__ = [ -# pylint: disable-msg=W0613 def process(mlist, msg, msgdata): """Add owner recipients.""" # The recipients are the owner and the moderator diff --git a/src/mailman/pipeline/replybot.py b/src/mailman/pipeline/replybot.py index dffffbf47..30980b008 100644 --- a/src/mailman/pipeline/replybot.py +++ b/src/mailman/pipeline/replybot.py @@ -44,7 +44,6 @@ log = logging.getLogger('mailman.error') -# pylint: disable-msg=W0232,R0201,R0911 class Replybot: """Send automatic responses.""" diff --git a/src/mailman/pipeline/tagger.py b/src/mailman/pipeline/tagger.py index fbf6c0749..eb6a6265a 100644 --- a/src/mailman/pipeline/tagger.py +++ b/src/mailman/pipeline/tagger.py @@ -65,7 +65,6 @@ def process(mlist, msg, msgdata): # of interest from the message match the regexp. If so, the message gets # added to the specific topics bucket. hits = {} - # pylint: disable-msg=W0612 for name, pattern, desc, emptyflag in mlist.topics: pattern = OR.join(pattern.splitlines()) cre = re.compile(pattern, re.IGNORECASE) diff --git a/src/mailman/pipeline/to_digest.py b/src/mailman/pipeline/to_digest.py index e4cce8a82..69ff97b81 100644 --- a/src/mailman/pipeline/to_digest.py +++ b/src/mailman/pipeline/to_digest.py @@ -39,7 +39,6 @@ from mailman.utilities.mailbox import Mailbox -# pylint: disable-msg=W0232,R0201 class ToDigest: """Add the message to the digest, possibly sending it.""" diff --git a/src/mailman/pipeline/to_outgoing.py b/src/mailman/pipeline/to_outgoing.py index ebb079a24..362c49458 100644 --- a/src/mailman/pipeline/to_outgoing.py +++ b/src/mailman/pipeline/to_outgoing.py @@ -38,7 +38,6 @@ from mailman.interfaces.handler import IHandler -# pylint: disable-msg=W0203,R0201 class ToOutgoing: """Send the message to the outgoing queue.""" diff --git a/src/mailman/pipeline/to_usenet.py b/src/mailman/pipeline/to_usenet.py index 38ed70970..b5e706abe 100644 --- a/src/mailman/pipeline/to_usenet.py +++ b/src/mailman/pipeline/to_usenet.py @@ -39,7 +39,6 @@ log = logging.getLogger('mailman.error') -# pylint: disable-msg=W0232,R0201 class ToUsenet: """Move the message to the outgoing news queue.""" diff --git a/src/mailman/utilities/passwords.py b/src/mailman/utilities/passwords.py index 896872436..f595a3c55 100644 --- a/src/mailman/utilities/passwords.py +++ b/src/mailman/utilities/passwords.py @@ -55,7 +55,6 @@ SCHEME_RE = r'{(?P<scheme>[^}]+?)}(?P<rest>.*)' -# pylint: disable-msg=W0232 class PasswordScheme: """Password scheme base class.""" TAG = b'' @@ -99,7 +98,6 @@ class NoPasswordScheme(PasswordScheme): """See `PasswordScheme`.""" return b'' - # pylint: disable-msg=W0613 @staticmethod def check_response(challenge, response): """See `PasswordScheme`.""" @@ -211,7 +209,6 @@ class PBKDF2PasswordScheme(PasswordScheme): derived_key = encode(digest + salt) return derived_key - # pylint: disable-msg=W0221 @staticmethod def check_response(challenge, response, prf, iterations): """See `PasswordScheme`.""" |
