summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2019-07-22 23:13:48 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-09-10 11:20:16 +0200
commit80138d4a7bb64b278011c8fc94debca0f881194b (patch)
tree67e698fc0c2727e204b3a2e4064457197c3667ef
parent9c3ad2cfa0c30bd7dbcb66e9114986968bd73802 (diff)
downloadpylint-git-80138d4a7bb64b278011c8fc94debca0f881194b.tar.gz
[functional tests] Import error must import syntax error
-rw-r--r--pylint/checkers/typecheck.py1
-rw-r--r--tests/functional/import_error.py (renamed from tests/functional/i/import_error.py)4
-rw-r--r--tests/functional/import_error.rc (renamed from tests/functional/i/import_error.rc)0
-rw-r--r--tests/functional/import_error.txt (renamed from tests/functional/i/import_error.txt)2
-rw-r--r--tests/functional/syntax_error.py (renamed from tests/functional/s/syntax_error.py)0
-rw-r--r--tests/functional/syntax_error.rc (renamed from tests/functional/s/syntax_error.rc)0
-rw-r--r--tests/functional/syntax_error.txt (renamed from tests/functional/s/syntax_error.txt)0
7 files changed, 3 insertions, 4 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py
index b12f761da..598462853 100644
--- a/pylint/checkers/typecheck.py
+++ b/pylint/checkers/typecheck.py
@@ -1187,7 +1187,6 @@ accessed. Python regular expressions are accepted.",
num_positional_args += implicit_args + already_filled_positionals
# Analyze the list of formal parameters.
-
args = list(itertools.chain(called.args.posonlyargs or (), called.args.args))
num_mandatory_parameters = len(args) - len(called.args.defaults)
parameters = []
diff --git a/tests/functional/i/import_error.py b/tests/functional/import_error.py
index 750d1eec9..70b83018b 100644
--- a/tests/functional/i/import_error.py
+++ b/tests/functional/import_error.py
@@ -24,6 +24,6 @@ try:
except ImportError:
pass
-from .collections import missing # [import-error]
+from c.collections import missing # [import-error]
-from ..s.syntax_error import toto # [syntax-error]
+from .syntax_error import toto # [syntax-error]
diff --git a/tests/functional/i/import_error.rc b/tests/functional/import_error.rc
index de78a17ce..de78a17ce 100644
--- a/tests/functional/i/import_error.rc
+++ b/tests/functional/import_error.rc
diff --git a/tests/functional/i/import_error.txt b/tests/functional/import_error.txt
index 3d4f3482d..4d05275f2 100644
--- a/tests/functional/i/import_error.txt
+++ b/tests/functional/import_error.txt
@@ -1,4 +1,4 @@
import-error:3::"Unable to import 'totally_missing'"
import-error:16::"Unable to import 'maybe_missing_2'"
-import-error:27::"Unable to import 'functional.c.collections'"
+import-error:27::"Unable to import 'c.collections'"
syntax-error:29::"Cannot import 'syntax_error' due to syntax error 'invalid syntax (<unknown>, line 1)'"
diff --git a/tests/functional/s/syntax_error.py b/tests/functional/syntax_error.py
index c93df6b05..c93df6b05 100644
--- a/tests/functional/s/syntax_error.py
+++ b/tests/functional/syntax_error.py
diff --git a/tests/functional/s/syntax_error.rc b/tests/functional/syntax_error.rc
index 58b5a9413..58b5a9413 100644
--- a/tests/functional/s/syntax_error.rc
+++ b/tests/functional/syntax_error.rc
diff --git a/tests/functional/s/syntax_error.txt b/tests/functional/syntax_error.txt
index f14ae39dd..f14ae39dd 100644
--- a/tests/functional/s/syntax_error.txt
+++ b/tests/functional/syntax_error.txt