Skip to content

Commit

Permalink
Use default_factory in dataclass
Browse files Browse the repository at this point in the history
This change is to introduce compatibility with Python 3.11
  • Loading branch information
crzdg committed Apr 15, 2023
1 parent 39bea86 commit 8b1a58c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frispy/disc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Disc class."""

from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Dict, Tuple, Type

import numpy as np
Expand Down Expand Up @@ -63,7 +63,7 @@ class Disc:
mass: float = 0.175 # kg
air_density: float = 1.225 # kg / m ^ 3
g: float = 9.81 # m / s ^ 2
model: Model = Model()
model: Model = field(default_factory=Model)
eom: EOM = None
eom_class: Type = EOM

Expand Down

0 comments on commit 8b1a58c

Please sign in to comment.