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

Mypy errors with hydrated_dataclass #420

Closed
jzazo opened this issue Mar 2, 2023 · 1 comment
Closed

Mypy errors with hydrated_dataclass #420

jzazo opened this issue Mar 2, 2023 · 1 comment

Comments

@jzazo
Copy link

jzazo commented Mar 2, 2023

Hi. The following code from your documentation raises a mypy error (without the frozen argument):

@hydrated_dataclass(target=dict)
class DictConf:
    x: int = 2
    y: str = 'hello'

DictConf(x=10)  #  mypy[call-arg] Unexpected keyword argument "x" for "DictConf"
@rsokl
Copy link
Contributor

rsokl commented Mar 2, 2023

mypy doesn't support dataclass transforms yet, but it looks like they are close: python/mypy#14293 . We develop against pyright for our support for static analysis as pyright is much faster (on the order of years) to implement new typing features.

@rsokl rsokl closed this as completed Mar 2, 2023
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