Skip to content

Use of deprecated generic type aliases instead of builtins #754

@oliverlambson

Description

@oliverlambson

Since granain supports >=3.10, use of the generic typing aliases is unnecessary (and they are deprecated, see "historical and deprecated features"). e.g. typing.Tuple should just be tuple from 3.10 onwards.

It's tedious to update this all manually, so I suggest enabling the ruff lint rules for pyupgrade to handle this automatically and check it going forward:

  # pyproject.toml
  ...
  [tool.ruff]
  line-length = 120
  extend-select = [
      ...
      'W',      # pycodestyle
+     'UP',     # pyupgrade
  ]

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