mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-27 07:32:18 +08:00
multiple files should be scannable in the main analysis API.
This commit is contained in:
@@ -13,25 +13,27 @@ elif len(argv) > 1 and argv[1] == 'force':
|
|||||||
if '--debug' in sys.argv:
|
if '--debug' in sys.argv:
|
||||||
jedi.set_debug_function()
|
jedi.set_debug_function()
|
||||||
|
|
||||||
path = sys.argv[2]
|
for path in sys.argv[2:]:
|
||||||
if isdir(path):
|
if path.startswith('--'):
|
||||||
import fnmatch
|
continue
|
||||||
import os
|
if isdir(path):
|
||||||
|
import fnmatch
|
||||||
|
import os
|
||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
for root, dirnames, filenames in os.walk(path):
|
for root, dirnames, filenames in os.walk(path):
|
||||||
for filename in fnmatch.filter(filenames, '*.py'):
|
for filename in fnmatch.filter(filenames, '*.py'):
|
||||||
paths.append(os.path.join(root, filename))
|
paths.append(os.path.join(root, filename))
|
||||||
else:
|
|
||||||
paths = [path]
|
|
||||||
|
|
||||||
try:
|
|
||||||
for path in paths:
|
|
||||||
for error in jedi.Script(path=path)._analysis():
|
|
||||||
print(error)
|
|
||||||
except Exception:
|
|
||||||
if '--pdb' in sys.argv:
|
|
||||||
import pdb
|
|
||||||
pdb.post_mortem()
|
|
||||||
else:
|
else:
|
||||||
raise
|
paths = [path]
|
||||||
|
|
||||||
|
try:
|
||||||
|
for path in paths:
|
||||||
|
for error in jedi.Script(path=path)._analysis():
|
||||||
|
print(error)
|
||||||
|
except Exception:
|
||||||
|
if '--pdb' in sys.argv:
|
||||||
|
import pdb
|
||||||
|
pdb.post_mortem()
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|||||||
Reference in New Issue
Block a user