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

ApplyTypeAnnotationsVisitor does not respect overwrite_existing_annotations for attributes #1159

Open
shrik450 opened this issue Jun 11, 2024 · 0 comments
Labels
bug Something isn't working codemod Bundled codemods, visitors, metadata providers

Comments

@shrik450
Copy link

Consider this example:

class X:
    x: int

used to patch:

class X:
    x: str

ApplyTypeAnnotationsVisitor will not change the type annotation on X.x to int even if you set overwrite_existing_annotations to True. This is the case even if you change it to be an assign (as in x: str = "a".)

@zsol zsol added bug Something isn't working codemod Bundled codemods, visitors, metadata providers labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codemod Bundled codemods, visitors, metadata providers
Projects
None yet
Development

No branches or pull requests

2 participants