Skip to content

Python scan parses excluded virtualenv during coupling analysis #664

Description

@SlanyCukr

Reproduction

With Desloppify 0.9.15 and backend/server/.venv configured as an exclusion:

$ desloppify --lang python scan --path backend/server --state .desloppify/state-python.json
Excluding (from config): ..., backend/server/.venv, ...
Zones: config: 4, production: 776, script: 2, test: 281
[4/17] Coupling + cycles + orphaned...
backend/server/.venv/lib/python3.14/site-packages/nodejs_wheel/share/doc/node/lldb_commands.py:279: SyntaxWarning: invalid escape sequence `\(`
backend/server/.venv/lib/python3.14/site-packages/nodejs_wheel/share/doc/node/lldb_commands.py:281: SyntaxWarning: invalid escape sequence `\w`

The zone counts correctly exclude the virtualenv, but one coupling-analysis subprocess still parses files beneath it.

Expected

Configured exclusions should be passed to every detector/subprocess, so an excluded virtualenv is neither analyzed nor able to emit parser warnings.

Actual

The coupling/cycle phase reaches a Python file inside the excluded virtualenv and leaks its SyntaxWarning into scan output. The scored zone counts appear unaffected, but the output is noisy and makes exclusion behavior look unreliable.

Notes

The virtualenv is inside the scanned project path (backend/server/.venv). This reproduces after desloppify exclude backend/server/.venv and a fresh scan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions