Skip to content

feat(app): iterate Configurable base-classes for non app.classes lists#380

Merged
minrk merged 1 commit into
ipython:masterfrom
ankostis:itermroclasses
Mar 17, 2017
Merged

feat(app): iterate Configurable base-classes for non app.classes lists#380
minrk merged 1 commit into
ipython:masterfrom
ankostis:itermroclasses

Conversation

@ankostis
Copy link
Copy Markdown
Contributor

@ankostis ankostis commented Mar 8, 2017

Context

The methods App._classes_inc_parents() &
App._classes_with_config_traits() are really useful when traversing
mro of base-classes in user code (e.g. printing config-value categories,
pre-validation checks). Currently those work directly on the
:attr:Application.classes only, and need to copy their code to emulate them.

Solution

This change adds an optional classes argument to those 2 methods that override the :attrclasses.
User code can utilize these methods for implementing custom logic on any class-list.

## Context
The methods `App._classes_inc_parents()` &
`App._classes_with_config_traits()` are really useful when traversing
mro of base-classes in user code (e.g. printing config-value categories,
pre-validation checks).  Currently those work directly on the
:attr:`Application.classes` only.

With this change, user code cat utilize these methods for implementing
custom logic.
@minrk minrk added this to the 5.0 milestone Mar 17, 2017
@minrk minrk merged commit f642808 into ipython:master Mar 17, 2017
@ankostis ankostis deleted the itermroclasses branch March 22, 2017 13:15
@Carreau Carreau added 5.0-re-review Need to re-review for potential API impact changes. 5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc) and removed 5.0-re-review Need to re-review for potential API impact changes. labels Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0-no-incidence change that has noincidence on 5.0 compat (eg: doc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants