Skip to content

agents(rules): update python rules with typing and runfiles conventions - #4035

Merged
rickeylev merged 1 commit into
bazel-contrib:mainfrom
rickeylev:update_python_rules_20260811
Aug 11, 2026
Merged

agents(rules): update python rules with typing and runfiles conventions#4035
rickeylev merged 1 commit into
bazel-contrib:mainfrom
rickeylev:update_python_rules_20260811

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Update the Python agent rules to standardize type annotation practices
and simplify runfiles initialization across Python files.

Clarify best practices by requiring explanatory comments for type
suppressions, adopting modern union syntax (X | None), and preferring
generic collections from collections.abc and builtins over legacy
typing equivalents. Additionally, instruct agents to prefer fail-fast
runfiles.CreateOrRaise() when setting up Bazel runfiles.

Add rules for type ignore comments, X | None union syntax, collections.abc
generics, and runfiles.CreateOrRaise usage.
@rickeylev
rickeylev marked this pull request as ready for review August 11, 2026 07:02
@rickeylev
rickeylev requested a review from aignas as a code owner August 11, 2026 07:02
@rickeylev
rickeylev merged commit 353b24e into bazel-contrib:main Aug 11, 2026
4 of 5 checks passed
@rickeylev
rickeylev deleted the update_python_rules_20260811 branch August 11, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant