Skip to content

Modernize syntax for Python 3.11 (ruff UP) #951

Open

Description

@tdstein

🤖 Follow-up to #944, which is deliberately limited to removing compatibility code.

What to build

Once the CLI Python floor is 3.11, set ruff's target-version to py311 and apply the pyupgrade (UP) rules: X | None instead of Optional[X], builtin generics instead of typing.List/Dict, and similar rewrites. This is a mechanical, behaviour-neutral change, kept separate so the floor change stays reviewable.

Acceptance criteria

  • ruff targets py311 with UP rules enabled, and just lint passes
  • The test suite passes unchanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an autonomous coding agent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions