You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[python] pylint runs on tests/ samples/ folders even when not generated by emitter #11424
The Python client emitter is running pylint on tests/ and samples/ directories even when those folders were not generated by the emitter, causing spurious lint failures on pre-existing or user-managed code.
Category: Bug Area: emitter:client:python
⚠️ No reproduction provided. A minimal repro (e.g., a TypeSpec project with pre-existing tests/ or samples/ folders) would help diagnose this issue.
🔍 Analysis
The Python emitter's post-generation pylint step appears to scan directories by name (tests/, samples/) rather than limiting its scope to files it actually generated.
This can cause failures when users have existing test or sample code that doesn't conform to pylint rules enforced by the emitter, even though the emitter never touched those files.
The fix likely involves tracking which files/directories were emitted and restricting the pylint invocation to only those paths.
📝 Suggested next steps
Confirm which version introduced this behavior
Identify the pylint invocation in the emitter pipeline and add a guard to only lint emitter-generated paths
Add a test case with a pre-existing tests/ folder to prevent regression