Summary
Add a --no-venv flag (and a corresponding AnalysisOptions field) that tells codeanalyzer-python to skip virtualenv creation / dependency installation and run analysis against the current / ambient Python environment instead.
Motivation
Today the analyzer provisions a virtualenv (and installs the target project's dependencies) so Jedi can resolve imports. In several contexts that step is unwanted:
- CI / containers where the project's dependencies are already installed in the active environment — the extra venv + install is redundant and slow.
- Ephemeral / sandboxed runs where network installs are disallowed or undesirable.
- Speed / reproducibility — reusing the ambient interpreter avoids minutes of per-run setup.
Proposed behavior
--no-venv CLI flag → AnalysisOptions(no_venv=True).
- When set, skip venv creation and dependency installation; point Jedi at the current
sys.prefix / active interpreter.
- Document the tradeoff: import/call-resolution quality then depends on what is installed in the ambient environment.
Notes
This pairs naturally with library / in-process use from the CLDK SDK (PyCodeanalyzer) and with --emit neo4j, where the host environment is often already the project's environment and the venv bootstrap is pure overhead.
Summary
Add a
--no-venvflag (and a correspondingAnalysisOptionsfield) that tells codeanalyzer-python to skip virtualenv creation / dependency installation and run analysis against the current / ambient Python environment instead.Motivation
Today the analyzer provisions a virtualenv (and installs the target project's dependencies) so Jedi can resolve imports. In several contexts that step is unwanted:
Proposed behavior
--no-venvCLI flag →AnalysisOptions(no_venv=True).sys.prefix/ active interpreter.Notes
This pairs naturally with library / in-process use from the CLDK SDK (
PyCodeanalyzer) and with--emit neo4j, where the host environment is often already the project's environment and the venv bootstrap is pure overhead.