Skip to content

v0.3.5

Choose a tag to compare

@eliegoudout eliegoudout released this 19 Apr 14:02
· 40 commits to main since this release

What's Changed

  • Breaking: isparamclass default value for raw is now True
  • Removed RawParamClass.__post_init__, now optional method
  • __signature__ property (works with vanilla __post_init__ or @classmethod / @staticmethod):
class A(ParamClass):
    x: int
    y: float = 0.1

    @staticmethod
    def __post_init__(pos_only_arg: str, /) -> None:
        self.z = pos_only_arg
>>> inspect.signature(A)
<Signature (post_init_args=[], /, *, x: int = ?, y: float = 0.1)>
  • MRO of paramclasses must now put all paramclasses first (fixes #28)
  • Internals better enforce standard use of paramclasses and make manual use of type(ParamClass) more difficult (see _run_once uses and _check_valid_mro)

Merged PRs

New Contributors

Full Changelog: v0.3.4...v0.3.5