-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.
Description
Mypy has a --strict option. We should update the mypy tests for generated clients from mypy -p google to mypy -p --strict google
gapic-generator-python/gapic/templates/noxfile.py.j2
Lines 186 to 194 in 1b63310
| session.run( | |
| 'mypy', | |
| '-p', | |
| {% if api.naming.module_namespace %} | |
| '{{ api.naming.module_namespace[0] }}', | |
| {% else %} | |
| '{{ api.naming.versioned_module_name }}', | |
| {% endif %} | |
| ) |
There is some guidance here for setting stricter options.
An excellent goal to aim for is to have your codebase pass when run against mypy --strict. This basically ensures that you will never have a type related error without an explicit circumvention somewhere (such as a # type: ignore comment).
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.