ipython / ipython/traitlets

short flags

オープン
#666 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
653
フォーク
217
平均マージ
2日 21時間
マージ済み PR(30日)
2

説明

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` )

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。