[🚀 Feature]: Lint and type-check the Python BiDi modules generated at build time
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
- 68/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- ci-cd, testing-qa
Línea de trabajo
Start with py/generate_bidi_protocol.py, py/private/generate_bidi_protocol.bzl, and the py:lint entry point to see how Bazel builds the generated modules and how lint currently runs. Then check the py/pyproject.toml exclusions and the generated errors.py, emulation.py, and common._bidi outputs. Done means the Bazel-built outputs pass ruff check, ruff format --check, and mypy in the lint workflow, with the existing generator output errors fixed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
The common._bidi domain modules generated by py/generate_bidi_protocol.py are never linted or type-checked, in CI or locally. ./go py:lint (the CI Lint job) runs ruff and mypy on the source tree, where those modules are gitignored and absent, and ruff's respect-gitignore = true skips them even after bazel run //py:generate-bidi-protocol writes them there.
While changing which collections.abc names the generator imports, I found that only a unit test of the generator's import logic would catch it emitting an annotation it doesn't import: the modules use from __future__ import annotations, so a missing import doesn't fail at import time either.
What the current output has (ruff 0.17.6):
- 57 ruff errors: 50 RUF036 (
Nonenot last in a union), 6 E501 and 1 I001 inerrors.py. emulation.pyanderrors.pyare notruff formatclean.- mypy passes when the modules are generated into the tree and
//py:mypyis run locally.
The generator's module docstring says "the build applies a format pass", but py/private/generate_bidi_protocol.bzl runs only the generator.
Suggestion: add a check that runs ruff check, ruff format --check and mypy against the Bazel-built //py:create-bidi-protocol-src outputs and include it in ./go py:lint, after fixing the existing errors in the generator so it starts green. The older generated layers (common/bidi, common/devtools) are deliberately excluded from ruff in py/pyproject.toml and are out of scope.
Related: #18378 has the same root cause for the API docs (built from the source tree, so generated modules are never listed).
Have you considered any alternatives or workarounds?
Have ./go py:lint run //py:generate-bidi-protocol first and lint that directory with --no-respect-gitignore. That is smaller, but it checks the working tree rather than what Bazel builds and ships, which is the same gap #18378 describes for the docs.
- Lenguaje dominante
- Java
- Estrellas
- 34.6k
- Forks
- 8.7k
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 107
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 SeleniumHQ/selenium
-
C-py I-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
SeleniumHQ/selenium#18438 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
SeleniumHQ/selenium#18323 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browserPosiblemente ocupada @Liz-Lian la tomó hace 2 días. AbiertoC-dotnet C-java C-nodejs C-py C-rb I-defect
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
SeleniumHQ/selenium#18428 ·
Los mantenedores suelen responder en 1 día
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copyingPosiblemente ocupada @Liz-Lian la tomó hace 2 días. AbiertoC-rust I-defect
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
SeleniumHQ/selenium#18427 ·
Los mantenedores suelen responder en 1 día
-
C-py D-chrome OS-windows
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
SeleniumHQ/selenium#18394 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de SeleniumHQ/selenium
Issues similares
-
area-integrations
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
? - Needs Triage bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/cudf-spark-jni#5598 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
oracle/graalvm-reachability-metadata#12264 ·
Los mantenedores suelen responder en 1 día
-
[source-facebook-pages] post stream never returns attachments.media_typePosiblemente ocupada @v-k-data la tomó hoy. Abiertoarea/connectors needs-triage type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
floci-io/floci#10107 · 1 comentario ·
Los mantenedores suelen responder en 1 día