Skip to content

[Feature Request]: deprecate old linters/formatter, switch to ruff #1020

@as3ii

Description

@as3ii

Problem Description

I'm opening this issue after PR #1018 to discuss how to implement the switch, in particular:

Proposed Solution

  • Enabled rules:
    The default enabled rules are: E4 E7 E9 F
    I usually enable the following rules: E W I N D UP ASYNC S BLE B A COM C4 DTZ EM FA ISC ICN LOG G PIE PYI Q RSE RET SLF SIM TID TCH INT ARG TD FIX ERA PL TRY PERF FURB DOC RUF
  • Disabled rules:
    I usually disable only specific rules when strictly necessary
  • Python target version: the oldest one you want to support (3.10?)
  • max line length: 120?
  • I usually don't touch other linter/formatter settings
  • the above-linked documentation contains a good basic workflow, I suggest to enable it filtering when it runs, with something like
on:
  push:
    branches:
      - 'main'
      - 'develop'
    paths:
      - '**.py'
      - 'pyproject.toml'
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
  merge_group:
  workflow_dispatch:

Alternatives Considered

There aren't many ruff alternatives, just stick with the old linters/formatter (maybe with better configurations), and run them one by one manually

Additional Information

ruff can be configured with its dedicated config file, or via pyproject.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions