Skip to content

Commit f4f4582

Browse files
committed
FIX Mutable default in the dataclass (#121)
1 parent e94c0cf commit f4f4582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chalk/arrow.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from dataclasses import dataclass
1+
from dataclasses import dataclass, field
22
from typing import List, Optional
33

44
from colour import Color
@@ -16,11 +16,11 @@
1616

1717
@dataclass
1818
class ArrowOpts:
19-
head_style: Style = Style()
19+
head_style: Style = field(default_factory=Style)
2020
head_pad: float = 0.0
2121
tail_pad: float = 0.0
2222
head_arrow: Optional[Diagram] = None
23-
shaft_style: Style = Style()
23+
shaft_style: Style = field(default_factory=Style)
2424
trail: Optional[Trail] = None
2525
arc_height: float = 0.0
2626

0 commit comments

Comments
 (0)