| 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 | """ |