pylint: Ignore 'undefined-variable' for tests.
It's less than optimal, but disabling it selectively because of https://bitbucket.org/logilab/pylint/issue/511/ is too annoying.
This commit is contained in:
parent
6c566198f1
commit
425cffc2f7
@ -46,8 +46,13 @@ def main():
|
||||
for fn in filenames:
|
||||
if os.path.splitext(fn)[1] == '.py':
|
||||
files.append(os.path.join(dirpath, fn))
|
||||
disabled = ['attribute-defined-outside-init', 'redefined-outer-name',
|
||||
'unused-argument']
|
||||
disabled = [
|
||||
'attribute-defined-outside-init',
|
||||
'redefined-outer-name',
|
||||
'unused-argument',
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
'undefined-variable',
|
||||
]
|
||||
no_docstring_rgx = ['^__.*__$', '^setup$']
|
||||
args = (['--disable={}'.format(','.join(disabled)),
|
||||
'--no-docstring-rgx=({})'.format('|'.join(no_docstring_rgx))] +
|
||||
|
@ -328,9 +328,6 @@ class TestBool:
|
||||
|
||||
"""Test Bool."""
|
||||
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
# pylint: disable=undefined-variable
|
||||
|
||||
TESTS = {True: ['1', 'yes', 'YES', 'true', 'TrUe', 'on'],
|
||||
False: ['0', 'no', 'NO', 'false', 'FaLsE', 'off']}
|
||||
|
||||
@ -942,9 +939,6 @@ class TestColorSystem:
|
||||
|
||||
"""Test ColorSystem."""
|
||||
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
# pylint: disable=undefined-variable
|
||||
|
||||
TESTS = {
|
||||
'RGB': QColor.Rgb,
|
||||
'rgb': QColor.Rgb,
|
||||
@ -1109,9 +1103,6 @@ class TestFont:
|
||||
|
||||
"""Test Font/QtFont."""
|
||||
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
# pylint: disable=undefined-variable
|
||||
|
||||
TESTS = {
|
||||
# (style, weight, pointsize, pixelsize, family
|
||||
'"Foobar Neue"':
|
||||
@ -1960,9 +1951,6 @@ class TestAutoSearch:
|
||||
|
||||
"""Test AutoSearch."""
|
||||
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
# pylint: disable=undefined-variable
|
||||
|
||||
TESTS = {
|
||||
'naive': ['naive', 'NAIVE'] + TestBool.TESTS[True],
|
||||
'dns': ['dns', 'DNS'],
|
||||
@ -2012,9 +2000,6 @@ class TestIgnoreCase:
|
||||
|
||||
"""Test IgnoreCase."""
|
||||
|
||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||
# pylint: disable=undefined-variable
|
||||
|
||||
TESTS = {
|
||||
'smart': ['smart', 'SMART'],
|
||||
True: TestBool.TESTS[True],
|
||||
|
Loading…
Reference in New Issue
Block a user