Cannot rename arrays
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
The report reproduces a rename mismatch in a Python function and links issue #5538 as the prior report. Read that issue and find the rename or reference-resolution entry point in Pyrefly; reproduce the example and check how rename handles the two arr_val bindings. Done means renaming the argument occurrence also updates the binding in the else branch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the Bug
This issue is a continuation of https://github.com/meta/pyrefly/issues/5538. I now see the same problem with other objects. In:
def consume(val: object, wgt: object) -> None: ...
def f(has_weights: bool, arr_out: list[list[float]]) -> None:
if has_weights:
arr_val = arr_out[0]
arr_wgt = arr_out[1]
else:
arr_val = arr_out
arr_wgt = None
consume(arr_val, arr_wgt)
renaming the arr_val passed to consume does not rename the one in else.
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
- Lingua principale
- Rust
- Stelle
- 7.2k
- Fork
- 578
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- 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 facebook/pyrefly
-
narrowing typechecking
Difficoltà 3/5 1-2 giorni Idoneità per principianti 69/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
typechecking
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
Tutte le issue di facebook/pyrefly
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
rubys/roundhouse#1917 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[cosmic-applet-battery] Division by zero displays NaN% when UPower reports max_brightness = 0Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
pop-os/cosmic-applets#1619 ·
I maintainer di solito rispondono entro 3 giorni
-
binding:python bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno