Skip to content

Add a way to lint pyi files #559

@calliecameron

Description

@calliecameron

I'd like to lint my pyi files, but currently it doesn't look like there's a way to do it. lint_ruff_aspect only looks at py_binary, py_library and py_test targets, but they can only take .py files as srcs, not .pyi files.

Looks like the easiest way to do this would be to make the aspect also look at filegroups tagged 'python', like the vale linter does for markdown.

This would have the added benefit of being able to lint files that don't really belong in a py_* target, e.g. scripts intended to be run outside bazel, without having to create a dummy py_* rule for them - they could just go in a tagged filegroup instead. I'd be inclined to add this to shellcheck as well, for the same reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions