ipython / ipython/traitlets

short flags

Aperta
#666 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
653
Fork
217
Merge medio
2g 21h
PR unite (30g)
2

Descrizione

I can create short flags like this:
```python
flags = {
("f", "overwrite"): (
{"DataWriter": {"overwrite": True}},
"Overwrite output file if it exists",
),
}
```
which gives me `-f`, `--overwrite`.

and yes/no flags with
```python
traitlets.config.boolean_flag(
"overwrite",
"DataWriter.overwrite",
"Overwrite output file if it exists",
"Don't overwrite output file if it exists",
)
```
which gives me `--overwrite`, `--no-overwrite`.

Is it possible to add the possibility to create short/long/no flags? e.g. like
```python
traitlets.config.boolean_flag(
("f", "overwrite"),
"DataWriter.overwrite",
"Overwrite output file if it exists",
"Don't overwrite output file if it exists",
)
```
(for `-f`, `--overwrite`, `--overwrite` )

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.