Skip to content

Enable Ruff pytest-style (PT) rules #947

Description

@fizyk

Summary

Enable Ruff's pytest-style (PT) rule family in the project lint configuration and CI checks.

Rationale

The project does not currently enforce pytest-style rules. This means rules such as PT007, which requires a list for pytest.mark.parametrize values, are reported by external analysis but are not validated by the repository's configured lint checks.

Affected areas

  • Ruff configuration
  • Lint command or CI workflow that runs Ruff
  • Existing test modules that violate enabled PT rules

Required changes

  1. Enable the Ruff PT rule family in the project configuration.
  2. Run the configured lint check against the repository.
  3. Update existing tests or add explicit, documented rule exceptions where required.
  4. Ensure CI fails when enabled PT rules are violated.

Acceptance criteria

  • Ruff selects the PT rule family.
  • The repository passes the configured Ruff lint command with the PT rule family enabled.
  • CI enforces the same Ruff configuration.

Backlinks

Requested by: @fizyk


Copied from dbfixtures/pytest-postgresql#1397

Activity

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

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