ipython / ipython/traitlets

Configurable should warn on unrecognized arguments

Đang mở
#926 5 bình luận 1 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ả

Currently direct `HasTraits` subclasses warn when they receive unrecognized arguments:

https://github.com/ipython/traitlets/blob/b0eaa6aa77e198cff68644a388400db850670c7d/tests/test_traitlets.py#L2802-L2810

However, this does not work with `Configurable` and its subclasses, although it is a subclass of `HasTraits`:

https://github.com/ipython/traitlets/blob/b0eaa6aa77e198cff68644a388400db850670c7d/traitlets/config/configurable.py#L53

![Image](https://github.com/user-attachments/assets/eb8e93c2-1a71-4724-b384-a19344dfca0f)

### Context

This is implemented in:

https://github.com/ipython/traitlets/blob/b0eaa6aa77e198cff68644a388400db850670c7d/traitlets/traitlets.py#L1381-L1399

Related to https://github.com/ipython/traitlets/issues/145.

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.