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

Don't require type annotations for locals when using --check-untyped-defs #8558

Open
rggjan opened this issue Mar 18, 2020 · 3 comments
Open

Comments

@rggjan
Copy link

rggjan commented Mar 18, 2020

Trying to reopen or clone #7744 but didn't figure out how, so I created a new issue instead.

See #7744 for all the required information.

@JukkaL
Copy link
Collaborator

JukkaL commented Mar 20, 2020

The issue is about cases like this, which currently generate an error:

def foo():
    data = { # error: Need type annotation for 'data'
        'abc': {}
    }

I think that not generating an error here should just be the default behavior. This would be a logical continuation of changes introduced in #7530.

@JukkaL JukkaL changed the title --check-untyped-defs-lite Don't require type annotations for locals when using --check-untyped-defs Mar 20, 2020
@JukkaL
Copy link
Collaborator

JukkaL commented Mar 20, 2020

@msullivan @ilevkivskyi Do you agree with me?

@ilevkivskyi
Copy link
Member

If the function itself has no annotations then yes, it would make sense to not require annotations for locals.

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

No branches or pull requests

3 participants