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:
|
for fn in filenames:
|
||||||
if os.path.splitext(fn)[1] == '.py':
|
if os.path.splitext(fn)[1] == '.py':
|
||||||
files.append(os.path.join(dirpath, fn))
|
files.append(os.path.join(dirpath, fn))
|
||||||
disabled = ['attribute-defined-outside-init', 'redefined-outer-name',
|
disabled = [
|
||||||
'unused-argument']
|
'attribute-defined-outside-init',
|
||||||
|
'redefined-outer-name',
|
||||||
|
'unused-argument',
|
||||||
|
# https://bitbucket.org/logilab/pylint/issue/511/
|
||||||
|
'undefined-variable',
|
||||||
|
]
|
||||||
no_docstring_rgx = ['^__.*__$', '^setup$']
|
no_docstring_rgx = ['^__.*__$', '^setup$']
|
||||||
args = (['--disable={}'.format(','.join(disabled)),
|
args = (['--disable={}'.format(','.join(disabled)),
|
||||||
'--no-docstring-rgx=({})'.format('|'.join(no_docstring_rgx))] +
|
'--no-docstring-rgx=({})'.format('|'.join(no_docstring_rgx))] +
|
||||||
|
@ -328,9 +328,6 @@ class TestBool:
|
|||||||
|
|
||||||
"""Test Bool."""
|
"""Test Bool."""
|
||||||
|
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
|
||||||
# pylint: disable=undefined-variable
|
|
||||||
|
|
||||||
TESTS = {True: ['1', 'yes', 'YES', 'true', 'TrUe', 'on'],
|
TESTS = {True: ['1', 'yes', 'YES', 'true', 'TrUe', 'on'],
|
||||||
False: ['0', 'no', 'NO', 'false', 'FaLsE', 'off']}
|
False: ['0', 'no', 'NO', 'false', 'FaLsE', 'off']}
|
||||||
|
|
||||||
@ -942,9 +939,6 @@ class TestColorSystem:
|
|||||||
|
|
||||||
"""Test ColorSystem."""
|
"""Test ColorSystem."""
|
||||||
|
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
|
||||||
# pylint: disable=undefined-variable
|
|
||||||
|
|
||||||
TESTS = {
|
TESTS = {
|
||||||
'RGB': QColor.Rgb,
|
'RGB': QColor.Rgb,
|
||||||
'rgb': QColor.Rgb,
|
'rgb': QColor.Rgb,
|
||||||
@ -1109,9 +1103,6 @@ class TestFont:
|
|||||||
|
|
||||||
"""Test Font/QtFont."""
|
"""Test Font/QtFont."""
|
||||||
|
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
|
||||||
# pylint: disable=undefined-variable
|
|
||||||
|
|
||||||
TESTS = {
|
TESTS = {
|
||||||
# (style, weight, pointsize, pixelsize, family
|
# (style, weight, pointsize, pixelsize, family
|
||||||
'"Foobar Neue"':
|
'"Foobar Neue"':
|
||||||
@ -1960,9 +1951,6 @@ class TestAutoSearch:
|
|||||||
|
|
||||||
"""Test AutoSearch."""
|
"""Test AutoSearch."""
|
||||||
|
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
|
||||||
# pylint: disable=undefined-variable
|
|
||||||
|
|
||||||
TESTS = {
|
TESTS = {
|
||||||
'naive': ['naive', 'NAIVE'] + TestBool.TESTS[True],
|
'naive': ['naive', 'NAIVE'] + TestBool.TESTS[True],
|
||||||
'dns': ['dns', 'DNS'],
|
'dns': ['dns', 'DNS'],
|
||||||
@ -2012,9 +2000,6 @@ class TestIgnoreCase:
|
|||||||
|
|
||||||
"""Test IgnoreCase."""
|
"""Test IgnoreCase."""
|
||||||
|
|
||||||
# https://bitbucket.org/logilab/pylint/issue/511/
|
|
||||||
# pylint: disable=undefined-variable
|
|
||||||
|
|
||||||
TESTS = {
|
TESTS = {
|
||||||
'smart': ['smart', 'SMART'],
|
'smart': ['smart', 'SMART'],
|
||||||
True: TestBool.TESTS[True],
|
True: TestBool.TESTS[True],
|
||||||
|
Loading…
Reference in New Issue
Block a user