tests: Ignore new pylint warnings
Newer versions of pylint complain about u'' not being needed and using open without setting encoding. These are valid warnings, but do not effect the operation of lorax so they have been added to the FalsePositive list in runpylint.py
This commit is contained in:
parent
a3810024ac
commit
49ff2c7d5c
@ -3,6 +3,7 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pocketlint import FalsePositive, PocketLintConfig, PocketLinter
|
from pocketlint import FalsePositive, PocketLintConfig, PocketLinter
|
||||||
|
import pylint
|
||||||
|
|
||||||
class LoraxLintConfig(PocketLintConfig):
|
class LoraxLintConfig(PocketLintConfig):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -13,6 +14,8 @@ class LoraxLintConfig(PocketLintConfig):
|
|||||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=1739167
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1739167
|
||||||
FalsePositive(r"Module 'rpm' has no '.*' member"),
|
FalsePositive(r"Module 'rpm' has no '.*' member"),
|
||||||
FalsePositive(r"raise-missing-from"),
|
FalsePositive(r"raise-missing-from"),
|
||||||
|
FalsePositive(r"redundant-u-string-prefix"),
|
||||||
|
FalsePositive(r"unspecified-encoding"),
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -45,6 +48,7 @@ class LoraxLintConfig(PocketLintConfig):
|
|||||||
return retval
|
return retval
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
print("INFO: Using pylint v%s" % pylint.__version__)
|
||||||
conf = LoraxLintConfig()
|
conf = LoraxLintConfig()
|
||||||
linter = PocketLinter(conf)
|
linter = PocketLinter(conf)
|
||||||
rc = linter.run()
|
rc = linter.run()
|
||||||
|
Loading…
Reference in New Issue
Block a user