mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Merge pull request #9 from littmus/master
Exclude relative imports and fix getting latest version.
This commit is contained in:
commit
22ac931a45
@ -22,7 +22,7 @@ from yarg.exceptions import HTTPError
|
||||
|
||||
REGEXP = [
|
||||
re.compile(r'^import (.+)$'),
|
||||
re.compile(r'from (.*?) import (?:.*)')
|
||||
re.compile(r'^from ((?!\.+).*?) import (?:.*)$')
|
||||
]
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ def get_imports_info(imports):
|
||||
continue
|
||||
if not data or not data.release_ids:
|
||||
continue
|
||||
last_release = data.release_ids[-1]
|
||||
last_release = data.latest_release_id
|
||||
result.append({'name': item, 'version': last_release})
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user