codecov / engineering-team

This is a general repo to use with GH Projects
1 stars 0 forks source link

[API] Add missing types to the code #1655

Closed JerrySentry closed 1 week ago

JerrySentry commented 3 weeks ago

mypy_results.txt Add typing to all function arguments and returns.

{
    'no-untyped-def': 4089, 
    'var-annotated': 12, 
    'arg-type': 81, 
    'valid-type': 2, 
    'return': 26, 
    'assignment': 23, 
    'return-value': 49, 
    'misc': 19, 
    'dict-item': 13, 
    'name-defined': 1, 
    'no-redef': 4, 
    'method-assign': 1, 
    'index': 1, 
    'syntax': 1, 
    'operator': 2, 
    'has-type': 2, 
    'override': 1, 
    'union-attr': 6, 
    'list-item': 1,
    'func-returns-value': 2
}
JerrySentry commented 1 week ago

Going to close this. It's not viable at all to add typing to 4000+ missing type defs in the repo. Instead the strategy is to have developers add missing types to files they touch in their PRs (even if it has no relationship on the lines of code they've touched in the file). Initially it will be a light prodding (ie will not disallow merging) but still only display as failed in CI and on pre-commit. Eventually will change this to blocking with enough feedback.