summaryrefslogtreecommitdiff
path: root/tests/functional/import_outside_toplevel.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-10-09 09:43:38 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-10-09 09:54:44 +0200
commitd3eda2e8a7952fd456815fe0cab98bb9f14efcfc (patch)
treeac8288caa49a66ec095e3d6e1fd9859137c9294c /tests/functional/import_outside_toplevel.py
parente0ab5b95158db74f1c7c26f67591d7d06d8a3888 (diff)
downloadpylint-git-d3eda2e8a7952fd456815fe0cab98bb9f14efcfc.tar.gz
``import-outside-toplevel`` is emitted for ``ImportFrom`` nodes as well.
Close #3175
Diffstat (limited to 'tests/functional/import_outside_toplevel.py')
-rw-r--r--tests/functional/import_outside_toplevel.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/import_outside_toplevel.py b/tests/functional/import_outside_toplevel.py
index 0575e59b2..762faa551 100644
--- a/tests/functional/import_outside_toplevel.py
+++ b/tests/functional/import_outside_toplevel.py
@@ -32,3 +32,7 @@ class C:
def k(flag):
if flag:
import tabnanny # [import-outside-toplevel]
+
+
+def j():
+ from collections import defaultdict # [import-outside-toplevel]