{ } Raw JSON

bundles / traitlets 5.15.0 / traitlets / config / application / Application / flatten_flags

function

traitlets.config.application:Application.flatten_flags

source: /traitlets/config/application.py :724

Signature

def   flatten_flags ( self )  →  tuple[dict[str, t.Any], dict[str, t.Any]]

Summary

Flatten flags and aliases for loaders, so cl-args override as expected.

Extended Summary

This prevents issues such as an alias pointing to InteractiveShell, but a config file setting the same trait in TerminalInteraciveShell getting inappropriate priority over the command-line arg. Also, loaders expect (key: longname) and not key: (longname, help) items.

Only aliases with exactly one descendent in the class list will be promoted.

Aliases

  • traitlets.config.Application.flatten_flags