summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2014-04-17 17:44:23 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2014-04-17 17:44:23 +0200
commitbf2520056a33522654fba7a605d88115d353e514 (patch)
treedd295cdc507f3598629233d9267a42593d63ac06
parentf30918424c0dcef79e5506f93fb3d904a18f905b (diff)
downloadpylint-bf2520056a33522654fba7a605d88115d353e514.tar.gz
remove optparse from default ignored-modules, we'll find another proper way to do that as needed
-rw-r--r--checkers/typecheck.py2
-rw-r--r--test/test_type.py17
2 files changed, 3 insertions, 16 deletions
diff --git a/checkers/typecheck.py b/checkers/typecheck.py
index ec44f8d..5fe293d 100644
--- a/checkers/typecheck.py
+++ b/checkers/typecheck.py
@@ -134,7 +134,7 @@ class should be ignored. A mixin class is detected if its name ends with \
"mixin" (case insensitive).'}
),
('ignored-modules',
- {'default': ('optparse',),
+ {'default': (),
'type': 'csv',
'metavar': '<module names>',
'help': 'List of module names for which member attributes \
diff --git a/test/test_type.py b/test/test_type.py
index 7c65215..352b6f9 100644
--- a/test/test_type.py
+++ b/test/test_type.py
@@ -23,28 +23,15 @@ class TypeCheckerTest(CheckerTestCase):
args=('Module', 'argparse', 'THIS_does_not_EXIST'))):
self.checker.visit_getattr(node)
+ @set_config(ignored_modules=('argparse',))
def test_no_member_in_getattr_ignored(self):
"""Make sure that a module attribute access check is omitted with a
module that is configured to be ignored.
"""
node = test_utils.extract_node("""
- import optparse
- optparse.THIS_does_not_EXIST
- """)
- with self.assertNoMessages():
- self.checker.visit_getattr(node)
-
-
- @set_config(ignored_modules=('argparse',))
- def test_no_member_in_getattr_ignored_cust_config(self):
- """Make sure that a module can be added to the ignored_modules list and
- a no-member message will not be raised upon attribute access.
- """
-
- node = test_utils.extract_node("""
import argparse
- argparse.THIS_does_not_EXIST
+ argparse.THIS_does_not_EXIST
""")
with self.assertNoMessages():
self.checker.visit_getattr(node)