Skip to content

python: kubectl-us-net and diff-nautobot-understack should extend the parent ruff config #2207

Description

@cardoe

AGENTS.md documents that "Most packages extend parent pyproject.toml configuration", and the OpenStack service packages do:

[tool.ruff]
# use our default and override anything we need specifically
extend = "../pyproject.toml"
target-version = "py312"

Two packages instead carry a copy-pasted [tool.ruff] / [tool.ruff.lint] block with no extend:

  • python/kubectl-us-net/pyproject.toml
  • python/diff-nautobot-understack/pyproject.toml

Their select lists are D, E, F, B, I, S, UP, ASYNC, which drops rules python/pyproject.toml enables for everything else: G, LOG, C4, PIE, PT, PLE, PLW, RUF, SIM. So these packages lint more weakly than the rest of the repo and won't pick up future parent-config changes. Dropping PT in particular means flake8-pytest-style isn't enforced.

Switch both to extend = "../pyproject.toml", keeping only genuinely package-specific overrides and per-file-ignores, and fix whatever the newly-enabled rules flag.

Noticed while reviewing #2205, where a new package copied the same non-extending block. Keeping that out of the PR since it's pre-existing and repo-wide.

🤖 Generated with Claude Code

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