Merge pull request #2597 from m10d/fix_dataclass__post_init__method

correct naming of dataclasses '__post_init__' method
This commit is contained in:
Cosimo Lupo 2022-04-24 06:58:44 +01:00 committed by GitHub
commit cefb41e6c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ class Range:
default: float = 0
"""Default value"""
def __post__init__(self):
def __post_init__(self):
self.minimum, self.maximum = sorted((self.minimum, self.maximum))
self.default = clamp(self.default, self.minimum, self.maximum)