Skip to content

Commit

Permalink
fix: default mutable raises error in python >=3.11
Browse files Browse the repository at this point in the history
Thanks Filipe !
  • Loading branch information
paquiteau committed Oct 17, 2024
1 parent 3f31a26 commit 0b8c621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/snake/core/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import Any
import numpy as np

Expand Down Expand Up @@ -112,8 +112,8 @@ class SimConfig:
"""All base configuration of a simulation."""

max_sim_time: float = 300
seq: GreConfig = default_gre
hardware: HardwareConfig = default_hardware
seq: GreConfig = field(default_factory=lambda: GreConfig(TR=50, TE=30, FA=15))
hardware: HardwareConfig = field(default_factory=lambda: HardwareConfig())
fov_mm: tuple[float, float, float] = (192.0, 192.0, 128.0)
shape: tuple[int, int, int] = (192, 192, 128) # Target reconstruction shape
rng_seed: int = 19290506
Expand Down

0 comments on commit 0b8c621

Please sign in to comment.