Modernize TypeVar syntax to PEP 695

Abierto
#1,158 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Start with src/art/utils/retry.py, where the issue identifies reused ParamSpec and TypeVar declarations and an orphaned TypeVar. Then search the repository for other old TypeVar syntax and unused declarations; the issue proposes reviewing more cases but does not name additional files. Done means replacing suitable declarations with PEP 695 syntax and removing dead declarations, with the affected tests passing.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hi :)

As part of my investigation, I came upon this repository.

There are many instances of old syntax that exists or just is orphaned.

For example:

P = ParamSpec("P")
R = TypeVar("R")
T = TypeVar("T")

src/art/utils/retry.py: "P" and "R" are reused in a few functions, while it would really benefit from PEP 695's new syntax, while T is just an orphaned TypeVar aka dead code.

I would be happy to look into more cases and prepare a PR to modernize and deal with such cases.

Lenguaje dominante
Python
Estrellas
10.9k
Forks
1k
Merge medio
2 d 5 h
PR fusionados (30 d)
38

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenPipe/ART

Todos los issues de OpenPipe/ART

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.