MCPcopy Create free account
hub / github.com/cdgriffith/Box / __init_subclass__

Method __init_subclass__

box/box.py:351–358  ·  view source on GitHub ↗
(cls, **kwargs)

Source from the content-addressed store, hash-verified

349 ] + [attr for attr in dir({}) if not attr.startswith("_")]
350
351 def __init_subclass__(cls, **kwargs):
352 super().__init_subclass__(**kwargs)
353 own = cls.__dict__.get("_box_defaults", {})
354 unknown = sorted(set(own) - set(BOX_OPTION_DEFAULTS))
355 if unknown:
356 raise BoxError(f"Unknown Box options in {cls.__name__}._box_defaults: {', '.join(unknown)}")
357 # Merged along the inheritance chain, so a subclass only lists what it changes
358 cls._box_resolved_defaults = {**getattr(cls, "_box_resolved_defaults", {}), **own}
359
360 def __new__(cls, *args: Any, **kwargs: Any):
361 """

Callers

nothing calls this directly

Calls 2

BoxErrorClass · 0.90
getMethod · 0.80

Tested by

no test coverage detected