Skip to content

Commit

Permalink
fix kw_only args for py 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Jun 18, 2024
1 parent feb9b0e commit 2d8cde8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muutils/json_serialize/serializable_dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def wrap(cls: Type[T]) -> Type[T]:
setattr(cls, field_name, field_value)

# special check, kw_only is not supported in python <3.9 and `dataclasses.MISSING` is truthy
if sys.version_info[1] < 9:
if sys.version_info < (3, 10):
if "kw_only" in kwargs:
if kwargs["kw_only"] == True: # noqa: E712
raise ValueError("kw_only is not supported in python >=3.9")
Expand Down

0 comments on commit 2d8cde8

Please sign in to comment.