MCPcopy Create free account
hub / github.com/ipython/traitlets / Any

Class Any

traitlets/traitlets.py:2491–2563  ·  view source on GitHub ↗

A trait which allows any value.

Source from the content-addressed store, hash-verified

2489
2490
2491class Any(TraitType[t.Optional[t.Any], t.Optional[t.Any]]):
2492 """A trait which allows any value."""
2493
2494 if t.TYPE_CHECKING:
2495
2496 @t.overload
2497 def __init__(
2498 self: Any,
2499 default_value: t.Any = ...,
2500 *,
2501 allow_none: Literal[False],
2502 read_only: bool | None = ...,
2503 help: str | None = ...,
2504 config: t.Any | None = ...,
2505 **kwargs: t.Any,
2506 ) -> None:
2507 ...
2508
2509 @t.overload
2510 def __init__(
2511 self: Any,
2512 default_value: t.Any = ...,
2513 *,
2514 allow_none: Literal[True],
2515 read_only: bool | None = ...,
2516 help: str | None = ...,
2517 config: t.Any | None = ...,
2518 **kwargs: t.Any,
2519 ) -> None:
2520 ...
2521
2522 @t.overload
2523 def __init__(
2524 self: Any,
2525 default_value: t.Any = ...,
2526 *,
2527 allow_none: Literal[True, False] = ...,
2528 help: str | None = ...,
2529 read_only: bool | None = False,
2530 config: t.Any = None,
2531 **kwargs: t.Any,
2532 ) -> None:
2533 ...
2534
2535 def __init__(
2536 self: Any,
2537 default_value: t.Any = ...,
2538 *,
2539 allow_none: bool = False,
2540 help: str | None = "",
2541 read_only: bool | None = False,
2542 config: t.Any = None,
2543 **kwargs: t.Any,
2544 ) -> None:
2545 ...
2546
2547 @t.overload
2548 def __get__(self, obj: None, cls: type[t.Any]) -> Any:

Callers 6

AnyTraitClass · 0.90
TransitionalClassClass · 0.90
TClass · 0.90
mypy_any_typingFunction · 0.90
LoggingConfigurableClass · 0.90
LazyConfigValueClass · 0.90

Calls

no outgoing calls

Tested by 1

mypy_any_typingFunction · 0.72