select/ignore/enable/disable is a mess
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia leggendo parse_options e le chiamate a option_manager.extend_default_ignore, poi traccia come le opzioni differiscono tra le modalità plugin e standalone. Confronta il comportamento proposto di enable/disable/select/ignore con ogni caso nell’issue; il lavoro è completato quando le regole ASYNC9xx possono essere abilitate in modo coerente senza dipendere dalla validazione a tre lettere di flake8 e la registrazione delle opzioni standalone è risolta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Status quo:
ignoreorextend-ignoreASYNC error codes in config is not possible, as flake8 gives an error- when running flake8-async as a plugin,
--ignoreand--extend-ignoreis possible on the command-line, flake8 does not seem to enforce the three-letter rule there selectdoes not currently have the validation rules enabled thatignoredoes.--selectand--ignoreare not supported when running as standalone- it's always possible to use
--enableand--disable. - when running as a plugin, we add individual error codes for ASYNC9xx to the default_ignored codes
- when running as standalone, we set the default of
--disabletoASYNC9.
Implications:
- if running as plugin, you have to
select/--selectASYNC9xx codes to enable them. Trying toenablethem will do nothing. - But if you want to default-enable ASYNC9xx rules, and disable them individually, you need to use a combination of
select/--selectand--disable(or--ignoreon the CLI). - if running as standalone, you have to
--enableASYNC9xx codes.--selectgives errors
This is... a mess. And it feels like --[extend-]ignore on the CLI, and select could get hit with the three-letter validation rules at any point which would make it impossible for end-users to enable ASYNC9xx codes unless they downgrade flake8 / we update flake8-async.
suggestions:
- Stop calling
option_manager.extend_default_ignore - Always default
--disabletoASYNC9 - in
parse_options, readoptions.selectand parse out any selectedASY...codes, adding them to--enable - same thing with
options.ignore->--disable, in case--ignorehas been used on the CLI - [maybe] register
--selectand--ignoreas options when running as standalone.- this would make it slightly easier to switch from plugin to standalone, but the added complexity might not be worth it. e.g.
flake8-async --select=ASYNC --ignore=ASYNC9 --enable=ASYNC91 --disable=ASYNC910would be possible to write and impossible to understand. Though that's ofc already the case when running as plugin - we could give a warning/error if users are using both enable+select or disable+ignore for ASYNC codes though
- this would make it slightly easier to switch from plugin to standalone, but the added complexity might not be worth it. e.g.
this would achieve:
- You can always use
--enableto enable ASYNC9 codes, you're not forced to touch select/ignore - Even if only using select/ignore you get the speed upside of disabling visitors (although this is somewhat diminished after adding ASYNC100 to Visitor91x)
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri 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 python-trio/flake8-async
-
Rename ASYNC126 to ASYNC4xx Apertarule improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
python-trio/flake8-async#457 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
python-trio/flake8-async#475 · 1 commento ·
-
Warn about unused `noqa`s Apertanew rule
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
python-trio/flake8-async#454 · 1 commento ·
-
ASYNC103 for sync functions Apertarule improvement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
python-trio/flake8-async#447 · 5 commenti ·
-
good first issue
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
python-trio/flake8-async#396 · 1 commento ·
Tutte le issue di python-trio/flake8-async
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
huggingface/Repo2RLEnv#163 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NousResearch/hermes-agent#121143 ·