Skip to content

[python] pylint runs on tests/ samples/ folders even when not generated by emitter #11424

Description

No description provided.

Activity

  1. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    🎯 Issue Triage

    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

    Generated by Agentic Triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:pythonIssue for the Python client emitter: @typespec/http-client-python

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions