[partially-unknown-type] asyncio.Event.wait() under --preset all

Aperta
#5,715 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, rust
Ambito
devtools, tooling

Direzione di ricerca

Reproduce by running pyrefly check --preset all repro.py against the given snippet, then the same with --preset strict since the two disagree. Search the source for the partially-unknown-type diagnostic and for where presets are defined to see which flags all turns on that strict does not, and how attribute types on library stubs like asyncio.Event.wait end up with an implicit Any. Done looks like zero diagnostics under --preset all plus a regression test covering the snippet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the Bug

Pyrefly 1.5.0 and 1.6.0-dev.1, Python 3.14.10, Windows

repro.py

import asyncio

async def wait(event: asyncio.Event) -> bool:
    return await event.wait()
pyrefly check --preset all repro.py

Expected

INFO 0 diagnostics

Actual

ERROR The type of attribute `wait` is partially unknown; it contains an implicit `Any` [partially-unknown-type]
 --> repro.py:4:24

pyrefly check --preset strict repro.py reports zero diagnostics.

Sandbox Link

https://pyrefly.org/sandbox/?project=v2.TY7BCsIwEER_ZdmThRoQPQX0pl-RS9puMZDuhiRWQ-m_2wYE9zTLzGNmwdF5SqgXTJaHTj4qFNTopiAxg02FeyeGDVcJA43wti4faCbO-hdQ9_1t4HiDTsRrw7BdpPyKDHYHoAKqso1hbDGUSKMvKsvkt8YQKVGGKxi03hs0HEp-Ch9niskJV-esTpfdwrVF22c302Obv9F_49cv

Lingua principale
Rust
Stelle
7.2k
Fork
578
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di facebook/pyrefly

Tutte le issue di facebook/pyrefly

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.