Configurable should warn on unrecognized arguments
- 主要语言
- Python
- 星标
- 653
- 派生
- 217
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 2
描述
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

### 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.
贡献指南
调研方向
Start with the existing unrecognized-argument test in tests/test_traitlets.py, then inspect the related handling in traitlets/traitlets.py and the Configurable definition in traitlets/config/configurable.py. Confirm the behavior for direct HasTraits subclasses and make the corresponding Configurable case warn on unrecognized arguments, with regression coverage showing the warning.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100