From: Dmitry Selyutin Date: Sun, 22 Oct 2017 19:43:04 +0000 (+0300) Subject: fix pylint warnings X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1fac91c27001f88690003e8c404d8e0da0c97dd1;p=gnulib.git fix pylint warnings --- diff --git a/pygnulib/config.py b/pygnulib/config.py index c47d995941..3baf512bd6 100644 --- a/pygnulib/config.py +++ b/pygnulib/config.py @@ -5,7 +5,6 @@ import codecs as _codecs_ -import collections as _collections_ import os as _os_ import re as _re_ @@ -487,6 +486,7 @@ class Base: @property def copymode(self): + """file copy mode ('symlink', 'hardlink' or None)""" return self.__table["copymode"] @copymode.setter @@ -498,6 +498,7 @@ class Base: @property def local_copymode(self): + """file copy mode for local directory ('symlink', 'hardlink' or None)""" return self.__table["local_copymode"] @local_copymode.setter @@ -509,6 +510,7 @@ class Base: @property def copyrights(self): + """update the license copyright text""" return bool(self.__table["options"] & Base._Option_.Copyrights) @copyrights.setter diff --git a/pygnulib/error.py b/pygnulib/error.py index 1a278dbcdc..933d28732b 100644 --- a/pygnulib/error.py +++ b/pygnulib/error.py @@ -5,6 +5,7 @@ def type_assert(key, value, types): + """panic if value has a type different than mentioned in types""" typeset = [] if isinstance(types, type): types = [types] diff --git a/pygnulib/parser.py b/pygnulib/parser.py index d5362b5104..2d68caab36 100644 --- a/pygnulib/parser.py +++ b/pygnulib/parser.py @@ -12,9 +12,7 @@ from .error import CommandLineError as _CommandLineError_ from .config import LGPLv2_LICENSE as _LGPLv2_LICENSE_ from .config import LGPLv3_LICENSE as _LGPLv3_LICENSE_ from .config import GPLv2_LICENSE as _GPLv2_LICENSE_ -from .config import GPLv3_LICENSE as _GPLv3_LICENSE_ from .config import LGPL_LICENSE as _LGPL_LICENSE_ -from .config import GPL_LICENSE as _GPL_LICENSE_ @@ -229,9 +227,6 @@ class CommandLine: class _CopyrightsCopyModeOption_(_CopyModeOption_): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - def __call__(self, parser, namespace, value, option=None): if not hasattr(namespace, self.dest): setattr(namespace, "copyrights", False)