##// END OF EJS Templates
import-checker: allow all absolute imports of stdlib modules...
Martin von Zweigbergk -
r44406:30357611 default
parent child Browse files
Show More
@@ -536,7 +536,7 b' def verify_modern_convention(module, roo'
536 536 if not fullname or (
537 537 fullname in stdlib_modules
538 538 # allow standard 'from typing import ...' style
539 and fullname != 'typing'
539 and fullname.startswith('.')
540 540 and fullname not in localmods
541 541 and fullname + '.__init__' not in localmods
542 542 ):
@@ -47,6 +47,11 b' Run additional tests for the import chec'
47 47 > from .. import os
48 48 > EOF
49 49
50 $ cat > testpackage/stdlibfrom.py << EOF
51 > from __future__ import absolute_import
52 > from collections import abc
53 > EOF
54
50 55 $ cat > testpackage/symbolimport.py << EOF
51 56 > from __future__ import absolute_import
52 57 > from .unsorted import foo
@@ -150,6 +155,7 b' Run additional tests for the import chec'
150 155 testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted
151 156 testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo
152 157 testpackage/stdafterlocal.py:3: stdlib import "os" follows local import: testpackage
158 testpackage/stdlibfrom.py:2: direct symbol import abc from collections
153 159 testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage
154 160 testpackage/subpackage/localimport.py:7: multiple "from .. import" statements
155 161 testpackage/subpackage/localimport.py:8: import should be relative: testpackage.subpackage.levelpriority
General Comments 0
You need to be logged in to leave comments. Login now