Lint fixes

This commit is contained in:
Florian Bruhin 2014-04-10 12:24:41 +02:00
parent 33aa8bfa52
commit 4ff86b660c
3 changed files with 7 additions and 6 deletions

View File

@ -121,12 +121,12 @@ class register:
# we assume count always has a default (and it should!) # we assume count always has a default (and it should!)
if self.nargs is not None: if self.nargs is not None:
# If nargs is overriden, use that. # If nargs is overriden, use that.
if isinstance(self.nargs, int): if isinstance(self.nargs, Iterable):
# Iterable (min, max)
minargs, maxargs = self.nargs
else:
# Single int # Single int
minargs, maxargs = self.nargs, self.nargs minargs, maxargs = self.nargs, self.nargs
else:
# Tuple (min, max)
minargs, maxargs = self.nargs
else: else:
defaultcount = (len(spec.defaults) if spec.defaults is not None defaultcount = (len(spec.defaults) if spec.defaults is not None
else 0) else 0)

View File

@ -179,7 +179,9 @@ class Config:
def has_option(self, section, option): def has_option(self, section, option):
"""Return True if option is in section. """Return True if option is in section.
Return False if section does not exist.""" Return False if section does not exist.
"""
if section not in self.config: if section not in self.config:
return False return False
return option in self.config[section] return option in self.config[section]

View File

@ -38,7 +38,6 @@ def init():
for everything. for everything.
""" """
global bridge global bridge
bridge = MessageBridge() bridge = MessageBridge()