Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type annotation in DCReflection class #321

Open
prjemian opened this issue Jan 12, 2024 · 0 comments
Open

type annotation in DCReflection class #321

prjemian opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@prjemian
Copy link
Contributor

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)

@prjemian prjemian added the bug label Jan 12, 2024
@prjemian prjemian added this to the v1.1.1 milestone Jan 12, 2024
@prjemian prjemian self-assigned this May 10, 2024
@prjemian prjemian modified the milestones: v1.1.1, v1.1.2 Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant