[🚀 Feature]: Lint and type-check the Python BiDi modules generated at build time
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- ci-cd, testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 34.6k
- Fork
- 8.7k
- Merge medio
- 1g 16h
- PR unite (30g)
- 107
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SeleniumHQ/selenium
-
C-py I-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
SeleniumHQ/selenium#18438 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
SeleniumHQ/selenium#18323 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browserForse già presa @Liz-Lian l’ha presa 2 giorni fa. ApertaC-dotnet C-java C-nodejs C-py C-rb I-defect
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SeleniumHQ/selenium#18428 ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copyingForse già presa @Liz-Lian l’ha presa 2 giorni fa. ApertaC-rust I-defect
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
SeleniumHQ/selenium#18427 ·
I maintainer di solito rispondono entro 1 giorno
-
C-py D-chrome OS-windows
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
SeleniumHQ/selenium#18394 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di SeleniumHQ/selenium
Issue simili
-
area-integrations
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
? - Needs Triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NVIDIA/cudf-spark-jni#5598 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
oracle/graalvm-reachability-metadata#12264 ·
I maintainer di solito rispondono entro 1 giorno
-
[source-facebook-pages] post stream never returns attachments.media_typeForse già presa @v-k-data l’ha presa oggi. Apertaarea/connectors needs-triage type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
floci-io/floci#10107 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno