summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoam Yorav-Raphael <noamraph@gmail.com>2015-06-29 09:08:14 +0300
committerNoam Yorav-Raphael <noamraph@gmail.com>2015-06-29 09:08:14 +0300
commit6cb5f83b7fc62a47a1ba80c2b5f68144f6bc7bbf (patch)
treead700c62e72edc5d5378b3c09d6a00f64e2ef8ea
parent4fe601c7e3677fb3f808d2564a76d4637b4230c8 (diff)
downloadpylint-rename-F0401-to-E0401.tar.gz
Rename F0401 (import-error) to E0401 as it is not a fatal pylint errorrename-F0401-to-E0401
-rw-r--r--pylint/checkers/imports.py7
-rw-r--r--pylint/test/messages/func_w0233.txt2
-rw-r--r--pylint/test/messages/func_w0402.txt2
-rw-r--r--pylint/test/unittest_lint.py5
4 files changed, 8 insertions, 8 deletions
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py
index 817d966..7d1e713 100644
--- a/pylint/checkers/imports.py
+++ b/pylint/checkers/imports.py
@@ -126,9 +126,10 @@ def make_graph(filename, dep_info, sect, gtype):
# the import checker itself ###################################################
MSGS = {
- 'F0401': ('Unable to import %s',
+ 'E0401': ('Unable to import %s',
'import-error',
- 'Used when pylint has been unable to import a module.'),
+ 'Used when pylint has been unable to import a module.',
+ {'old_names': [('F0401', 'import-error')]}),
'R0401': ('Cyclic import (%s)',
'cyclic-import',
'Used when a cyclic import between two or more modules is \
@@ -246,7 +247,7 @@ given file (report RP0402 must not be disabled)'}
self._check_reimport(node, name)
# TODO This appears to be the list of all messages of the checker...
- # @check_messages('W0410', 'W0401', 'W0403', 'W0402', 'W0404', 'W0406', 'F0401')
+ # @check_messages('W0410', 'W0401', 'W0403', 'W0402', 'W0404', 'W0406', 'E0401')
@check_messages(*(MSGS.keys()))
def visit_from(self, node):
"""triggered when a from statement is seen"""
diff --git a/pylint/test/messages/func_w0233.txt b/pylint/test/messages/func_w0233.txt
index c9686e1..d36408b 100644
--- a/pylint/test/messages/func_w0233.txt
+++ b/pylint/test/messages/func_w0233.txt
@@ -1,6 +1,6 @@
+E: 20: Unable to import 'nonexistant'
E: 22:CCC: Module 'input.func_w0233' has no 'BBBB' member
E: 27:CCC.__init__: Module 'input.func_w0233' has no 'BBBB' member
E: 50:Super2.__init__: Super of 'Super2' has no '__woohoo__' member
-F: 20: Unable to import 'nonexistant'
W: 12:AAAA.__init__: __init__ method from a non direct base class 'BBBBMixin' is called
W: 48:Super2.__init__: __init__ method from base class 'dict' is not called \ No newline at end of file
diff --git a/pylint/test/messages/func_w0402.txt b/pylint/test/messages/func_w0402.txt
index 9f42830..3bbcc5d 100644
--- a/pylint/test/messages/func_w0402.txt
+++ b/pylint/test/messages/func_w0402.txt
@@ -1,3 +1,3 @@
-F: 8: Unable to import 'unknown.package'
+E: 8: Unable to import 'unknown.package'
W: 5: Wildcard import input.indirect1
W: 8: Wildcard import unknown.package
diff --git a/pylint/test/unittest_lint.py b/pylint/test/unittest_lint.py
index 92a5c1e..e2f5381 100644
--- a/pylint/test/unittest_lint.py
+++ b/pylint/test/unittest_lint.py
@@ -430,7 +430,7 @@ class PyLinterTC(unittest.TestCase):
self.linter.error_mode()
checkers = self.linter.prepare_checkers()
checker_names = set(c.name for c in checkers)
- should_not = set(('design', 'format', 'imports', 'metrics',
+ should_not = set(('design', 'format', 'metrics',
'miscellaneous', 'similarities'))
self.assertSetEqual(set(), should_not & checker_names)
@@ -444,8 +444,7 @@ class PyLinterTC(unittest.TestCase):
self.linter.set_option('reports', False)
self.linter.set_option('disable', 'R,C,W')
checker_names = [c.name for c in self.linter.prepare_checkers()]
- for cname in ('design', 'metrics', 'similarities',
- 'imports'): # as a Fatal message that should be ignored
+ for cname in ('design', 'metrics', 'similarities'):
self.assertFalse(cname in checker_names, cname)
def test_addmessage(self):