MCPcopy Create free account

hub / github.com/ipython/traitlets / functions

Functions933 in github.com/ipython/traitlets

↓ 124 callersMethodtag
Sets metadata and returns self. This allows convenient metadata tagging when initializing the trait, such as: Examples -----
traitlets/traitlets.py:876
↓ 95 callersFunctionreveal_type
(*args: t.Any, **kwargs: t.Any)
tests/test_typing.py:32
↓ 88 callersMethodappend
Append an item to a List
traitlets/config/loader.py:105
↓ 36 callersMethoderror
Raise a TraitError Parameters ---------- obj : HasTraits or None The instance which owns the trait. If not
traitlets/traitlets.py:771
↓ 30 callersMethodload_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 callersMethodparse_command_line
Parse the command line arguments.
traitlets/config/application.py:841
↓ 29 callersMethodmerge
merge another config object into this one
traitlets/config/loader.py:257
↓ 27 callersFunctionwarn
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 callersMethodget
(self, obj: HasTraits, cls: type[t.Any] | None = None)
traitlets/traitlets.py:648
↓ 25 callersMethodupdate
Update either a set or dict
traitlets/config/loader.py:159
↓ 24 callersMethodon_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 callersMethodextend
Extend a list
traitlets/config/loader.py:109
↓ 20 callersFunction_from_string_test
Run a test of trait.from_string
tests/test_traitlets.py:2902
↓ 18 callersMethodrun_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 callersMethod__init__
( self: Any, default_value: t.Any = ..., *, allow_none: Litera
traitlets/traitlets.py:2497
↓ 17 callersMethodinstance
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 callersFunctionindent
(val: str)
traitlets/utils/text.py:11
↓ 16 callersMethodtraits
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 callersMethodcopy
(self)
traitlets/config/loader.py:311
↓ 15 callersFunctionexpected_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 callersMethodobserve
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 callersMethodinit_bar
(self)
tests/config/test_application.py:99
↓ 13 callersMethodload_config_file
Load config files by filename and path.
traitlets/config/application.py:955
↓ 12 callersMethodclass_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 callersMethodclear_instance
unset _instance for this class and singleton parents.
traitlets/config/configurable.py:543
↓ 12 callersMethodget
(self, key: str, default: t.Any = None)
traitlets/config/loader.py:773
↓ 11 callersMethodinfo
Returns a description of the trait.
traitlets/traitlets.py:2161
↓ 11 callersMethodinitialized
Has an instance been created?
traitlets/config/configurable.py:598
↓ 11 callersMethodlaunch_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 callersFunctionchange_dict
(*ordered_values)
tests/test_traitlets.py:70
↓ 10 callersMethodclass_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 callersMethodformat
(self, record: logging.LogRecord)
traitlets/config/application.py:144
↓ 10 callersMethodinit_foo
(self)
tests/config/test_application.py:96
↓ 10 callersMethodtrait_metadata
Get metadata values for trait by key.
traitlets/traitlets.py:1950
↓ 9 callersMethoddefault_value_repr
(self)
traitlets/traitlets.py:3720
↓ 9 callersMethodfrom_string
(self, s: str)
traitlets/traitlets.py:2657
↓ 9 callersMethodupdate_config
Update config and load the new values
traitlets/config/configurable.py:234
↓ 8 callersMethod_validate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:737
↓ 8 callersMethodclass_init
(self, cls: type[t.Any], name: str | None)
traitlets/traitlets.py:4043
↓ 8 callersFunctionclass_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 callersFunctionclass_to_names
(classes)
tests/config/test_application.py:103
↓ 8 callersMethodclear
(self)
traitlets/config/loader.py:511
↓ 8 callersFunctiondescribe
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 callersMethodunobserve
Remove a trait change handler. This is used to unregister handlers to trait change notifications. Parameters ----------
traitlets/traitlets.py:1683
↓ 7 callersMethod__init__
(__self, cls, self)
tests/test_traitlets.py:2843
↓ 7 callersMethod_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 callersMethod_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 callersMethodcollisions
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 callersFunctionimport_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 callersFunctionis_trait
Returns whether the given value is an instance or subclass of TraitType.
traitlets/traitlets.py:195
↓ 7 callersMethodsubclass_init
(self, cls: type[t.Any])
traitlets/traitlets.py:2562
↓ 6 callersMethodhold_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 callersMethodinsert
(self, index: int, other: t.Any)
traitlets/config/loader.py:150
↓ 6 callersMethodprepend
like list.extend, but for the front
traitlets/config/loader.py:113
↓ 6 callersMethodtrait_names
Get a list of all the names of this class' traits.
traitlets/traitlets.py:1915
↓ 6 callersFunctionwrap_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 callersFunction_is_section_key
Is a Config key a section name (does it start with a capital)?
traitlets/config/loader.py:219
↓ 5 callersMethodclass_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 callersMethodhas_trait
Returns True if the object has a trait with the specified name.
traitlets/traitlets.py:1832
↓ 5 callersFunctionrepr_type
Return a string representation of a value and its type for readable error messages.
traitlets/utils/descriptions.py:176
↓ 4 callersMethod__init__
(self, *args: t.Any, **kwds: t.Any)
traitlets/config/loader.py:238
↓ 4 callersMethod__setitem__
(self, key: str, value: t.Any)
traitlets/config/loader.py:345
↓ 4 callersMethod_resolve_string
Resolve a string supplied for a type into an actual object.
traitlets/traitlets.py:2019
↓ 4 callersMethod_transform
default transform: no-op
traitlets/traitlets.py:311
↓ 4 callersFunction_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 callersFunctionadd_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 callersMethodfrom_string
(self, s: str)
traitlets/traitlets.py:2964
↓ 4 callersFunctionget_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 callersFunctionget_output_error_code
Get stdout, stderr, and exit code from running a command
traitlets/tests/utils.py:9
↓ 4 callersMethodinitialize
(self, *args, **kwargs)
tests/config/test_application.py:798
↓ 4 callersMethodinitialize
(self, argv=None)
examples/myapp.py:126
↓ 4 callersMethodload_config
Load the config from a file and return it as a Config object.
traitlets/config/loader.py:565
↓ 4 callersMethodstart
(self)
examples/myapp.py:134
↓ 4 callersMethodtrait_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 callersMethodvalidate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:2643
↓ 4 callersMethodwarn
(msg: t.Any)
traitlets/config/configurable.py:202
↓ 3 callersMethod__getitem__
(self, key: str)
traitlets/config/loader.py:329
↓ 3 callersFunction_callback_wrapper
(cb: t.Any)
traitlets/traitlets.py:946
↓ 3 callersMethod_choices_str
Returns a description of the trait choices (not none).
traitlets/traitlets.py:3243
↓ 3 callersMethod_cross_validate
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:746
↓ 3 callersMethod_has_section
(self, key: str)
traitlets/config/loader.py:308
↓ 3 callersMethod_load_config
load traits from a Config object
traitlets/config/configurable.py:163
↓ 3 callersFunction_safe_literal_eval
Safely evaluate an expression Returns original string if eval fails. Use only where types are ambiguous.
traitlets/traitlets.py:182
↓ 3 callersMethod_super_repr
(self)
traitlets/config/loader.py:385
↓ 3 callersMethodadd
Add an item to a set
traitlets/config/loader.py:169
↓ 3 callersFunctioncast_unicode
(s: str | bytes, encoding: str = "utf-8")
traitlets/utils/__init__.py:9
↓ 3 callersFunctiondeprecated_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 callersMethoddescribe
(self)
examples/myapp.py:64
↓ 3 callersMethodemit_alias_help
Yield the lines for alias part of the help.
traitlets/config/application.py:514
↓ 3 callersMethodexit
(self, exit_status: int | str | None = 0)
traitlets/config/application.py:1062
↓ 3 callersMethodget_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 callersMethodget_value
(self, trait: TraitType[t.Any, t.Any])
traitlets/config/loader.py:382
↓ 3 callersMethodinfo
(self)
traitlets/traitlets.py:768
↓ 3 callersMethodinfo_rst
(self)
traitlets/traitlets.py:3260
↓ 3 callersMethodlink
(self)
traitlets/traitlets.py:317
↓ 3 callersMethodmake_dynamic_default
(self)
traitlets/traitlets.py:2339
↓ 3 callersMethodmatch_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 callersMethodnotify_change
Notify observers of a change event
traitlets/traitlets.py:1531
↓ 3 callersMethodsection_names
return section names as a list
traitlets/config/configurable.py:130
↓ 3 callersMethodset
(self, obj: t.Any, value: t.Any)
traitlets/traitlets.py:3714
next →1–100 of 933, ranked by callers