ipython / ipython/traitlets

initialize_subcommand does not print help

Đang mở
#103 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
653
Fork
217
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
2

Mô tả

IPython kernelspec is deprecated (ipapp.py) :

```
subcommands = dict(
...
kernelspec=('jupyter_client.kernelspecapp.KernelSpecApp',
"DEPRECATED: Manage Jupyter kernel specifications."
),
)

```

Initialize subcommand in traitlets though does not print it:

```
@catch_config_error
def initialize_subcommand(self, subc, argv=None):
"""Initialize a subcommand with argv."""
subapp, help = self.subcommands.get(subc) # help unused.

if isinstance(subapp, string_types):
subapp = import_item(subapp)

# clear existing instances
self.__class__.clear_instance()
# instantiate
self.subapp = subapp.instance(config=self.config)
# and initialize subapp
self.subapp.initialize(argv)
```

example

```
$ ipython kernelspec
No subcommand specified. Must specify one of: ['install-self', 'list', 'install']

Manage Jupyter kernel specifications.

Subcommands
-----------

Subcommands are launched as `jupyter kernelspec cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter kernelspec cmd -h`.

install-self
[DEPRECATED] Install the IPython kernel spec directory for this Python.
list
List installed kernel specifications.
install
Install a kernel specification directory.
```

It default to the subapp description, which in itself is not deprecated, But its IPython alias is.

Does affect many subapp.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.