Skip to content

type annotation in DCSample class #321

@prjemian

Description

@prjemian

Regarding

hklpy/hkl/configuration.py

Lines 248 to 249 in 32e3043

# TODO: Once py38 is dropped, re-enable the default value setting
U: List[List[float]] # = field(default_factory=list[list[float]])

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 #317 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions