diff options
author | Joris Roovers <jroovers@cisco.com> | 2019-03-13 13:41:22 +0100 |
---|---|---|
committer | Joris Roovers <jroovers@cisco.com> | 2019-03-13 13:41:22 +0100 |
commit | 3c2eec6d8b45b762cd1539d7c23f1b240a6beb31 (patch) | |
tree | 2fcd493651197764b32d2808e1d2d23975fae63e | |
parent | 948fc65453b5655a0d8ebb6cf5aeaaf0308654ec (diff) |
Pylint fixes for python >= 3.4
Upgraded pylint to 2.3.1 for python >= 3.4 and resolved some new issues.
-rw-r--r-- | .pylintrc | 2 | ||||
-rw-r--r-- | gitlint/config.py | 5 | ||||
-rw-r--r-- | test-requirements.txt | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -11,7 +11,7 @@ # R0801: Similar lines in files # I0011: Informational: locally disabled pylint # I0013: Informational: Ignoring entire file -disable=bad-option-value,C0111,W0511,W0142,W0622,W0223,W0212,R0901,R0801,I0011,I0013,anomalous-backslash-in-string,useless-object-inheritance +disable=bad-option-value,C0111,W0511,W0142,W0622,W0223,W0212,R0901,R0801,I0011,I0013,anomalous-backslash-in-string,useless-object-inheritance,unnecessary-pass [Format] max-line-length=120 diff --git a/gitlint/config.py b/gitlint/config.py index 97b20ca..670b519 100644 --- a/gitlint/config.py +++ b/gitlint/config.py @@ -225,8 +225,9 @@ class LintConfig(object): # only allow setting general options that exist and don't start with an underscore if not hasattr(self, attr_name) or attr_name[0] == "_": raise LintConfigError(u"'{0}' is not a valid gitlint option".format(option_name)) - else: - setattr(self, attr_name, option_value) + + # else: + setattr(self, attr_name, option_value) def __eq__(self, other): return isinstance(other, LintConfig) and \ diff --git a/test-requirements.txt b/test-requirements.txt index 450c5ca..4dfd61c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,5 +13,5 @@ astroid<=1.3.2; python_version < '2.7' # astroid is a pylint dependency isort==4.2.15; python_version == '3.3' # specific version for pylint 1.7.6 pylint==1.9.2; python_version == '2.7' pylint==1.7.6; python_version == '3.3' -pylint==2.1.1; python_version >= '3.4' +pylint==2.3.1; python_version >= '3.4' -e . |