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

DateStyle and TimeStyle are not part of the public API #526

Open
BenGale93 opened this issue Nov 29, 2024 · 1 comment
Open

DateStyle and TimeStyle are not part of the public API #526

BenGale93 opened this issue Nov 29, 2024 · 1 comment

Comments

@BenGale93
Copy link

Hi, thanks for the great library!

I'm writing a wrapper function for gt.fmt_datetime, gt.fmt_date etc. but I need to import DateStyle and TimeStyle from great_tables._formats to type hint the function correctly.

Have you considered re-exporting these Literals so they are accessible from the public API? Happy to make the PR myself, as well as re-export any other type hints that are in the public API if you agree this should be done.

@jrycw
Copy link
Collaborator

jrycw commented Dec 14, 2024

Thanks for bringing this up.

@machow and @rich-iannone, do you think we should consider exposing some literals to make it easier for users to adopt type hints?

In the meantime, this could be a good opportunity to reflect on how we might enhance our type hints. I understand that the linter struggles with interpreting our databackend logic, and ensuring smooth compatibility with mypy remains a significant challenge for us.

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