mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Add a way to specify environments in tox
This commit is contained in:
@@ -110,8 +110,12 @@ class StaticAnalysisCase(object):
|
||||
cases.append((line_nr + 1, column, match.group(3)))
|
||||
return cases
|
||||
|
||||
def run(self, compare_cb):
|
||||
analysis = jedi.Script(self._source, path=self._path)._analysis()
|
||||
def run(self, compare_cb, environment):
|
||||
analysis = jedi.Script(
|
||||
self._source,
|
||||
path=self._path,
|
||||
environment=environment,
|
||||
)._analysis()
|
||||
typ_str = lambda inst: 'warning ' if isinstance(inst, Warning) else ''
|
||||
analysis = [(r.line, r.column, typ_str(r) + r.name)
|
||||
for r in analysis]
|
||||
|
||||
Reference in New Issue
Block a user