ipython / ipython/traitlets

Configurable should warn on unrecognized arguments

Open
#926 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
653
Forks
217
Avg merge
2d 21h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.