Skip to content

Commit

Permalink
use default factory in dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 14, 2023
1 parent a8016f9 commit 16a16b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octreelib/grid/grid_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class GridConfigBase(ABC):
corner: corner of a grid
"""

octree_manager_type: Type[T] = field(default_factory=lambda: OctreeManager)
octree_type: Type[T] = field(default_factory=lambda: Octree)
octree_config: OctreeConfigBase = OctreeConfigBase()
octree_manager_type: Type[T] = OctreeManager
octree_type: Type[T] = Octree
octree_config: OctreeConfigBase = field(default_factory=lambda: OctreeConfigBase())
debug: bool = False
grid_voxel_edge_length: int = 1
corner: Point = field(default_factory=lambda: np.array(([0.0, 0.0, 0.0])))
Expand Down

0 comments on commit 16a16b5

Please sign in to comment.