Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ipython/traitlets
/ functions
Functions
933 in github.com/ipython/traitlets
⨍
Functions
933
◇
Types & classes
362
↓ 124 callers
Method
tag
Sets metadata and returns self. This allows convenient metadata tagging when initializing the trait, such as: Examples -----
traitlets/traitlets.py:876
↓ 95 callers
Function
reveal_type
(*args: t.Any, **kwargs: t.Any)
tests/test_typing.py:32
↓ 88 callers
Method
append
Append an item to a List
traitlets/config/loader.py:105
↓ 36 callers
Method
error
Raise a TraitError Parameters ---------- obj : HasTraits or None The instance which owns the trait. If not
traitlets/traitlets.py:771
↓ 30 callers
Method
load_config
Load a config from somewhere, return a :class:`Config` instance. Usually, this will cause self.config to be set and then returned. Ho
traitlets/config/loader.py:514
↓ 30 callers
Method
parse_command_line
Parse the command line arguments.
traitlets/config/application.py:841
↓ 29 callers
Method
merge
merge another config object into this one
traitlets/config/loader.py:257
↓ 27 callers
Function
warn
Like warnings.warn(), but category and stacklevel are required. You pretty much never want the default stacklevel of 1, so this helps encoura
traitlets/utils/warnings.py:9
↓ 26 callers
Method
get
(self, obj: HasTraits, cls: type[t.Any] | None = None)
traitlets/traitlets.py:648
↓ 25 callers
Method
update
Update either a set or dict
traitlets/config/loader.py:159
↓ 24 callers
Method
on_trait_change
DEPRECATED: Setup a handler to be called when a trait changes. This is used to setup dynamic notifications of trait changes. Static
traitlets/traitlets.py:1604
↓ 21 callers
Method
extend
Extend a list
traitlets/config/loader.py:109
↓ 20 callers
Function
_from_string_test
Run a test of trait.from_string
tests/test_traitlets.py:2902
↓ 18 callers
Method
run_completer
Mostly borrowed from argcomplete's unit tests Modified to take an application instead of an ArgumentParser Command is the current co
tests/config/test_argcomplete.py:98
↓ 17 callers
Method
__init__
( self: Any, default_value: t.Any = ..., *, allow_none: Litera
traitlets/traitlets.py:2497
↓ 17 callers
Method
instance
Returns a global instance of this class. This method create a new instance if none have previously been created and returns a previou
traitlets/config/configurable.py:554
↓ 16 callers
Function
indent
(val: str)
traitlets/utils/text.py:11
↓ 16 callers
Method
traits
Get a ``dict`` of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects. The Tr
traitlets/traitlets.py:1919
↓ 15 callers
Method
copy
(self)
traitlets/config/loader.py:311
↓ 15 callers
Function
expected_warnings
r"""Context for use in testing to catch known warnings matching regexes Parameters ---------- matching : list of strings or compiled rege
tests/_warnings.py:70
↓ 15 callers
Method
observe
Setup a handler to be called when a trait changes. This is used to setup dynamic notifications of trait changes. Parameters
traitlets/traitlets.py:1649
↓ 14 callers
Method
init_bar
(self)
tests/config/test_application.py:99
↓ 13 callers
Method
load_config_file
Load config files by filename and path.
traitlets/config/application.py:955
↓ 12 callers
Method
class_traits
Get a ``dict`` of all the traits of this class. The dictionary is keyed on the name and the values are the TraitType objects. This m
traitlets/traitlets.py:1784
↓ 12 callers
Method
clear_instance
unset _instance for this class and singleton parents.
traitlets/config/configurable.py:543
↓ 12 callers
Method
get
(self, key: str, default: t.Any = None)
traitlets/config/loader.py:773
↓ 11 callers
Method
info
Returns a description of the trait.
traitlets/traitlets.py:2161
↓ 11 callers
Method
initialized
Has an instance been created?
traitlets/config/configurable.py:598
↓ 11 callers
Method
launch_instance
Launch a global instance of this Application If a global instance already exists, this reinitializes and starts it
traitlets/config/application.py:1075
↓ 10 callers
Function
change_dict
(*ordered_values)
tests/test_traitlets.py:70
↓ 10 callers
Method
class_get_help
Get the help string for this class in ReST format. If `inst` is given, its current trait values will be used in place of class defaul
traitlets/config/configurable.py:251
↓ 10 callers
Method
format
(self, record: logging.LogRecord)
traitlets/config/application.py:144
↓ 10 callers
Method
init_foo
(self)
tests/config/test_application.py:96
↓ 10 callers
Method
trait_metadata
Get metadata values for trait by key.
traitlets/traitlets.py:1950
↓ 9 callers
Method
default_value_repr
(self)
traitlets/traitlets.py:3720
↓ 9 callers
Method
from_string
(self, s: str)
traitlets/traitlets.py:2657
↓ 9 callers
Method
update_config
Update config and load the new values
traitlets/config/configurable.py:234
↓ 8 callers
Method
_validate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:737
↓ 8 callers
Method
class_init
(self, cls: type[t.Any], name: str | None)
traitlets/traitlets.py:4043
↓ 8 callers
Function
class_of
Returns a string of the value's type with an indefinite article. For example 'an Image' or 'a PlotValue'.
traitlets/utils/descriptions.py:134
↓ 8 callers
Function
class_to_names
(classes)
tests/config/test_application.py:103
↓ 8 callers
Method
clear
(self)
traitlets/config/loader.py:511
↓ 8 callers
Function
describe
Return string that describes a value Parameters ---------- article : str or None A definite or indefinite article. If the article
traitlets/utils/descriptions.py:9
↓ 8 callers
Method
unobserve
Remove a trait change handler. This is used to unregister handlers to trait change notifications. Parameters ----------
traitlets/traitlets.py:1683
↓ 7 callers
Method
__init__
(__self, cls, self)
tests/test_traitlets.py:2843
↓ 7 callers
Method
_classes_inc_parents
Iterate through configurable classes, including configurable parents :param classes: The list of classes to iterate; if not set,
traitlets/config/application.py:177
↓ 7 callers
Method
_classes_with_config_traits
Yields only classes with configurable traits, and their subclasses. :param classes: The list of classes to iterate; if n
traitlets/config/application.py:998
↓ 7 callers
Method
collisions
Check for collisions between two config objects. Returns a dict of the form {"Class": {"trait": "collision message"}}`, indicating wh
traitlets/config/loader.py:275
↓ 7 callers
Function
import_item
Import and return ``bar`` given the string ``foo.bar``. Calling ``bar = import_item("foo.bar")`` is the functional equivalent of executing th
traitlets/utils/importstring.py:11
↓ 7 callers
Function
is_trait
Returns whether the given value is an instance or subclass of TraitType.
traitlets/traitlets.py:195
↓ 7 callers
Method
subclass_init
(self, cls: type[t.Any])
traitlets/traitlets.py:2562
↓ 6 callers
Method
hold_trait_notifications
Context manager for bundling trait change notifications and cross validation. Use this when doing multiple trait assignments (init, c
traitlets/traitlets.py:1456
↓ 6 callers
Method
insert
(self, index: int, other: t.Any)
traitlets/config/loader.py:150
↓ 6 callers
Method
prepend
like list.extend, but for the front
traitlets/config/loader.py:113
↓ 6 callers
Method
trait_names
Get a list of all the names of this class' traits.
traitlets/traitlets.py:1915
↓ 6 callers
Function
wrap_paragraphs
Wrap multiple paragraphs to fit a specified width. This is equivalent to textwrap.wrap, but with support for multiple paragraphs, as separate
traitlets/utils/text.py:34
↓ 5 callers
Function
_is_section_key
Is a Config key a section name (does it start with a capital)?
traitlets/config/loader.py:219
↓ 5 callers
Method
class_config_section
Get the config section for this class. Parameters ---------- classes : list, optional The list of other classes i
traitlets/config/configurable.py:361
↓ 5 callers
Method
has_trait
Returns True if the object has a trait with the specified name.
traitlets/traitlets.py:1832
↓ 5 callers
Function
repr_type
Return a string representation of a value and its type for readable error messages.
traitlets/utils/descriptions.py:176
↓ 4 callers
Method
__init__
(self, *args: t.Any, **kwds: t.Any)
traitlets/config/loader.py:238
↓ 4 callers
Method
__setitem__
(self, key: str, value: t.Any)
traitlets/config/loader.py:345
↓ 4 callers
Method
_resolve_string
Resolve a string supplied for a type into an actual object.
traitlets/traitlets.py:2019
↓ 4 callers
Method
_transform
default transform: no-op
traitlets/traitlets.py:311
↓ 4 callers
Function
_validate_bounds
Validate that a number to be applied to a trait is between bounds. If value is not between min_bound and max_bound, this raises a TraitE
traitlets/traitlets.py:2566
↓ 4 callers
Function
add_article
Returns the string with a prepended article. The input does not need to begin with a character. Parameters ---------- name : str
traitlets/utils/descriptions.py:145
↓ 4 callers
Method
from_string
(self, s: str)
traitlets/traitlets.py:2964
↓ 4 callers
Function
get_logger
Grab the global logger instance. If a global Application is instantiated, grab its logger. Otherwise, grab the root logger.
traitlets/log.py:13
↓ 4 callers
Function
get_output_error_code
Get stdout, stderr, and exit code from running a command
traitlets/tests/utils.py:9
↓ 4 callers
Method
initialize
(self, *args, **kwargs)
tests/config/test_application.py:798
↓ 4 callers
Method
initialize
(self, argv=None)
examples/myapp.py:126
↓ 4 callers
Method
load_config
Load the config from a file and return it as a Config object.
traitlets/config/loader.py:565
↓ 4 callers
Method
start
(self)
examples/myapp.py:134
↓ 4 callers
Method
trait_has_value
Returns True if the specified trait has a value. This will return false even if ``getattr`` would return a dynamically generated defa
traitlets/traitlets.py:1836
↓ 4 callers
Method
validate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:2643
↓ 4 callers
Method
warn
(msg: t.Any)
traitlets/config/configurable.py:202
↓ 3 callers
Method
__getitem__
(self, key: str)
traitlets/config/loader.py:329
↓ 3 callers
Function
_callback_wrapper
(cb: t.Any)
traitlets/traitlets.py:946
↓ 3 callers
Method
_choices_str
Returns a description of the trait choices (not none).
traitlets/traitlets.py:3243
↓ 3 callers
Method
_cross_validate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:746
↓ 3 callers
Method
_has_section
(self, key: str)
traitlets/config/loader.py:308
↓ 3 callers
Method
_load_config
load traits from a Config object
traitlets/config/configurable.py:163
↓ 3 callers
Function
_safe_literal_eval
Safely evaluate an expression Returns original string if eval fails. Use only where types are ambiguous.
traitlets/traitlets.py:182
↓ 3 callers
Method
_super_repr
(self)
traitlets/config/loader.py:385
↓ 3 callers
Method
add
Add an item to a set
traitlets/config/loader.py:169
↓ 3 callers
Function
cast_unicode
(s: str | bytes, encoding: str = "utf-8")
traitlets/utils/__init__.py:9
↓ 3 callers
Function
deprecated_method
Show deprecation warning about a magic method definition. Uses warn_explicit to bind warning to method definition instead of triggering code,
traitlets/utils/warnings.py:17
↓ 3 callers
Method
describe
(self)
examples/myapp.py:64
↓ 3 callers
Method
emit_alias_help
Yield the lines for alias part of the help.
traitlets/config/application.py:514
↓ 3 callers
Method
exit
(self, exit_status: int | str | None = 0)
traitlets/config/application.py:1062
↓ 3 callers
Method
get_default_logging_config
Return the base logging configuration. The default is to log to stderr using a StreamHandler, if no default handler already exists.
traitlets/config/application.py:227
↓ 3 callers
Method
get_value
(self, trait: TraitType[t.Any, t.Any])
traitlets/config/loader.py:382
↓ 3 callers
Method
info
(self)
traitlets/traitlets.py:768
↓ 3 callers
Method
info_rst
(self)
traitlets/traitlets.py:3260
↓ 3 callers
Method
link
(self)
traitlets/traitlets.py:317
↓ 3 callers
Method
make_dynamic_default
(self)
traitlets/traitlets.py:2339
↓ 3 callers
Method
match_class_completions
Match the word to be completed against our Configurable classes Check if cword_prefix could potentially match against --{class}. for any clas
traitlets/config/argcomplete_config.py:104
↓ 3 callers
Method
notify_change
Notify observers of a change event
traitlets/traitlets.py:1531
↓ 3 callers
Method
section_names
return section names as a list
traitlets/config/configurable.py:130
↓ 3 callers
Method
set
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:3714
next →
1–100 of 933, ranked by callers