mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Exclude relative imports.
ex) from .foo import bar
This commit is contained in:
parent
7e06129afa
commit
2c5906ea58
@ -22,7 +22,7 @@ from yarg.exceptions import HTTPError
|
||||
|
||||
REGEXP = [
|
||||
re.compile(r'^import (.+)$'),
|
||||
re.compile(r'from (.*?) import (?:.*)')
|
||||
re.compile(r'^from ((?!\.+).*?) import (?:.*)$')
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user