Explicitly require Y/N for Command._ask
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
Beginne bei src/manage/commands.py ungefähr in den Zeilen 610–624, insbesondere beim Einstiegspunkt Command._ask und der verknüpften Prompt-Logik. Überprüfe, dass eine Eingabe wie yhn abgelehnt wird, statt als y behandelt zu werden, während die vorgesehenen Y/N-Antworten ihr erwartetes Verhalten beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Is your feature request related to a problem? Please describe.
Had pymanager uninstall <tag> in my terminal and in a dumb panic on my split keyboard, submitted the characters yhn:
pymanager uninstall 3.13.11
Uninstall Python 3.13.11? [Y/n] yhn
Expected to cancel/break since yhn does not match a provided option - y or n.
In actuality, it proceeded to remove that python installation.
Describe the solution you'd like
Literally match for the submitted character y or n.
Describe alternatives you've considered
Not panicking and hitting n (or hitting anything else really, as long as it does not start with y)
Additional context
Was a silly mistake that costed me enough rebuild time that I came back just to figure out why it happened.
https://github.com/python/pymanager/blob/main/src/manage/commands.py#L624
Since we match via startswith, it does not matter what the remaining characters are - as long as expect_char is the first char, then _ask evaluates.
- Vorherrschende Sprache
- Python
- Sterne
- 344
- Forks
- 74
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 7
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python/pymanager
-
documentation
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
Alle Issues in python/pymanager
Ähnliche Issues
-
essnmx good first issue
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
-
[Feature] 奇物选择添加优先级 Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
syfoud/Simulated_Scepter#174 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Giskard-AI/giskard-oss#2840 · 1 Kommentar ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Offenarea: repo bug perceived difficulty: 2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
yeti-platform/yeti#1380 ·