traitlets
traitlets copied to clipboard
A lightweight Traits like module
Consider a configurable that has a child configurable: ``` from traitlets.config import Configurable, Config from traitlets import Int class Child(Configurable): value = Int(default_value=1).tag(config=True) class Parent(Configurable): classes = [Child] def __init__(self,...
Hi, I realize this may be re-opening a can of worms, but I was looking for a way to re-support `--key v1 v2 v3` for `Container` traits in `argparse`-based CLI...
Even though [the class Int has min and max arguments](https://github.com/ipython/traitlets/blob/main/traitlets/traitlets.py#L2039) these are not [documented](https://traitlets.readthedocs.io/en/stable/trait_types.html#numbers).
I encountered this after upgrading ipython. An AttributeError in traitlets has stopped ipython from opening. I am not quite sure what's going on in the code after a brief peak,...
traitlets' types are used to perform run-time checks. Would adding type annotation on them make sense? It seems that we have some information that we could use to potentially find...
Hi, I've got a simple question. I'm developping a package with a lots of classes whose attributes are traitlets. All of them use the tag `sync` like this `x =...
- empty lazy config is falsy, non-empty is truthy - checking `in` for empty lazy config returns False, indicating there's no config there
As part of ipython/ipywidgets#1676, @SylvainCorlay and I were discussing a sort of validator of this sort: ```python @validate('value) def validate_value(self, proposal): if isinstance(proposal, six.text_types): self.format = 'url' proposal = proposal.encode('utf-8')...
By searching the repo, I was able to find this description in the changelog: > Trait attributes initialized with read_only=True can only be set with the set_trait method. Attempts to...