Tracking: complete the `ty` gradual-typing baseline (un-ignore rules; PEP 723 blocker astral-sh/ty#691)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Comienza con pyproject.toml para seleccionar una regla de ty ignorada y, después, ejecuta el check existente de .github/workflows/ty.yml tras uv sync en Python 3.14. Corrige los archivos informados para esa regla y confirma que su recuento de diagnósticos llega a cero antes de eliminar su entrada de ignore. Ten en cuenta los scripts PEP 723 porque astral-sh/ty#691 impide tratarlos como parte de la línea base del repositorio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Follow-up to #15180, which added an informational ty type-check job (.github/workflows/ty.yml, continue-on-error: true, ty check --exit-zero). This issue tracks what it takes to turn that advisory job into a required gate as type hints are added to the algorithms gradually, and records the current blockers.
How the gradual baseline works today
pyproject.toml [tool.ty] pins the interpreter and currently ignores 15 rules so the informational job starts from a green-ish baseline instead of drowning in noise:
call-non-callable, deprecated, invalid-argument-type, invalid-assignment,
invalid-parameter-default, invalid-return-type, invalid-type-arguments,
invalid-type-form, no-matching-overload, not-iterable, not-subscriptable,
parameter-already-assigned, unresolved-attribute, unresolved-import,
unsupported-operator
Requirements to "complete" the work
The work is done rule-by-rule, matching how typing is added to the algorithms incrementally:
- Pick one ignored rule from the list above.
- Fix the files that trip it — add annotations / correct signatures — as bite-sized good-first-issues.
unresolved-importis largely environment noise (third-party stubs) and should be handled by making sureuv syncinstalls the dep, not by editing code. - Un-ignore the rule: delete its
rules.<name> = "ignore"line in[tool.ty]once its diagnostic count is zero on a synced 3.14 env. - When all rules are un-ignored and the baseline is clean, follow the promotion path documented inline in
ty.yml:--exit-zero→--exit-zero-on-warning→ drop the flag + setcontinue-on-error: falseto maketya required check.
Blocker: PEP 723 single-file scripts (astral-sh/ty#691)
ty treats a # /// script inline-metadata file as its own project, so it does not inherit the repo's [tool.ty] rule severities. Those files therefore surface the "ignored" diagnostics regardless of config, which will produce false failures the moment any rule is promoted to error. Until astral-sh/ty#691 lands, the options are:
- run the gate with
ty check --exclude-scripts(skips PEP 723 files), or - keep the job informational for script files specifically.
Un-ignoring rules for the non-script bulk of the repo can proceed in parallel and does not need to wait on #691.
Note on ty check --fix
For the record (asked on #15180): on the current tree, ty check --fix reports 0 fixed, 36 remaining — i.e. no changes, as expected. ty 0.0.74 ships no autofixes for any of these diagnostic categories yet, and it has no --unsafe-changes flag (the safe/unsafe fix split is a ruff feature ty hasn't implemented). So there is nothing for a "--fix results" PR to contain right now; this is worth revisiting once ty grows fix support.
- Lenguaje dominante
- Python
- Estrellas
- 225k
- Forks
- 51.1k
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 172
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TheAlgorithms/Python
-
enhancement good first issue hacktoberfest tracking issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
TheAlgorithms/Python#15234 · 79 comentarios ·
-
help wanted
TheAlgorithms/Python#15351 · 2 asignados ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
TheAlgorithms/Python#15337 · 11 comentarios ·
-
Open Pull Request File Map Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
TheAlgorithms/Python#15310 · 23 comentarios ·
-
priya-sundaram-dev as a triager? Abierto
TheAlgorithms/Python#15081 · 129 comentarios · 2 asignados ·
Todos los issues de TheAlgorithms/Python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anthropics/skills#1811 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
speaches-ai/speaches#678 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
datalayer/mcp-compose#42 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
conda-forge/spacy-feedstock#177 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
UKGovernmentBEIS/inspect_evals#2523 ·