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

Rethink detection of weakmode #925

Closed
jhance opened this issue Oct 13, 2015 · 3 comments
Closed

Rethink detection of weakmode #925

jhance opened this issue Oct 13, 2015 · 3 comments
Labels
bug mypy got something wrong

Comments

@jhance
Copy link
Collaborator

jhance commented Oct 13, 2015

Currently we "check the first 10 tokens". This is arbitrary and could lead to weirdness. Imagine a scenario where there are more options like this - there could even be more than 10 and then, well...

I feel like we should check tokens up until the first non-comment or non-docstring and search in any of those.

@JukkaL JukkaL added the bug mypy got something wrong label Oct 14, 2015
@JukkaL
Copy link
Collaborator

JukkaL commented Oct 14, 2015

Yeah, that was just a quick hack to get a prototype working. We may also want to reconsider how weak mode works in general. My vision is to make it the default mode, so that you'd get some useful type checking even for programs without any type annotations. I'll file a separate issue about weak mode in general. It could be one of the killer features that will make mypy useful for large projects who can't easily annotate everything.

@gvanrossum
Copy link
Member

Honestly I think we should rip out the current implementation of weak mode completely, and maybe start over later if we still want it. AFAIK it's not tested, not used, and not working. @ecprice Thoughts?

@JelleZijlstra
Copy link
Member

I don't know what "weak mode" was, but it's apparently gone, so this can be closed.

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

No branches or pull requests

4 participants