Show More
@@ -536,7 +536,7 b' def verify_modern_convention(module, roo' | |||||
536 | if not fullname or ( |
|
536 | if not fullname or ( | |
537 | fullname in stdlib_modules |
|
537 | fullname in stdlib_modules | |
538 | # allow standard 'from typing import ...' style |
|
538 | # allow standard 'from typing import ...' style | |
539 |
and fullname |
|
539 | and fullname.startswith('.') | |
540 | and fullname not in localmods |
|
540 | and fullname not in localmods | |
541 | and fullname + '.__init__' not in localmods |
|
541 | and fullname + '.__init__' not in localmods | |
542 | ): |
|
542 | ): |
@@ -47,6 +47,11 b' Run additional tests for the import chec' | |||||
47 | > from .. import os |
|
47 | > from .. import os | |
48 | > EOF |
|
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 | $ cat > testpackage/symbolimport.py << EOF |
|
55 | $ cat > testpackage/symbolimport.py << EOF | |
51 | > from __future__ import absolute_import |
|
56 | > from __future__ import absolute_import | |
52 | > from .unsorted import foo |
|
57 | > from .unsorted import foo | |
@@ -150,6 +155,7 b' Run additional tests for the import chec' | |||||
150 | testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted |
|
155 | testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted | |
151 | testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo |
|
156 | testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo | |
152 | testpackage/stdafterlocal.py:3: stdlib import "os" follows local import: testpackage |
|
157 | testpackage/stdafterlocal.py:3: stdlib import "os" follows local import: testpackage | |
|
158 | testpackage/stdlibfrom.py:2: direct symbol import abc from collections | |||
153 | testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage |
|
159 | testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage | |
154 | testpackage/subpackage/localimport.py:7: multiple "from .. import" statements |
|
160 | testpackage/subpackage/localimport.py:7: multiple "from .. import" statements | |
155 | testpackage/subpackage/localimport.py:8: import should be relative: testpackage.subpackage.levelpriority |
|
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