Closed sobolevn closed 5 years ago
Adding such option allows code to stay untyped, this is not ok for me. Consider these options:
Annotate unannotated functions :) This is what this plugin for, after all.
Use partial annotation like annotating only one argument or only return type. It's better than nothing.
Use dummy annotation -> Any
. This looks like bullshit, but it makes mypy to threat function as annotated and validate its body. Nice and easy start.
I'm thinking about adding --strict
option for projects, that already annotated all code with options 4 and 5 and need to move to 3.
I am not sure how exactly we can achieve that, but here's my problem:
As you can see the ratio of typed/untyped is 50/50 in this case. And I only have two functions here. But, this plugin reports this file as invalid.
What have I tried?
setup.cfg
, this does not work as well. Since, now I allow all other functions in this module to be untyped. That's not what I want.What I seek is a some kind of setting to resolve this situation: like "Too few items to analyse" or similar.