bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
4 stars 12 forks source link

type annotation in DCReflection class #321

Open prjemian opened 8 months ago

prjemian commented 8 months ago

Regarding https://github.com/bluesky/hklpy/blob/32e3043e6ce0b7690c09b30702bc3046d7b2a141/hkl/configuration.py#L248-L249

Is py38 the issue, or is it because DCReflection is not a dataclass?

I believe the default_factory field should be a zero-argument callable, such as...

default_factory=lambda: [[]]  # list containing an empty list

_Originally posted by @padraic-shafer in https://github.com/bluesky/hklpy/pull/317#discussion_r1447752887_