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

DataclassReader cannot read datetime.time fields #60

Open
ytausch opened this issue Jul 27, 2024 · 1 comment
Open

DataclassReader cannot read datetime.time fields #60

ytausch opened this issue Jul 27, 2024 · 1 comment

Comments

@ytausch
Copy link

ytausch commented Jul 27, 2024

When attempting to read a datetime.time field with DataclassReader, I get the following error:

name 'datetime' is not defined. Did you forget to import 'datetime'?

which is raised here:

self.type_hints = typing.get_type_hints(cls)

I think dataclass-csv should support parsing datetime.time fields out of the box.

@kraktus
Copy link

kraktus commented Jan 25, 2025

nvm, confused datetime.date and datetime.time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants