-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
process: make sure type annoations pass with mypy (#542)
* Add mypy to nox sessions * Mark google/cloud package as type-checked * Ignore types for dependencies lacking type info * Fix type annotations in publish flow controller * Fix type hints in thread-based Batch * Fix type annotations in sequencers * Fix type hints in dispatcher * Fix type hints in publisher client * Fix misc type errors in various modules * Fix type hints in leaser * Fix type annotations in streaming pull manager * Fix gapic timeout hint in older api-core versions google-api-core versions prior to v2.2.2 lack the definition of _MethodDefault, thus a workaround is needed for that. * Remove py.typed marker file The autogenerated code does not pass mypy type checks yet, thus we should not advertise the package as type-checked. * Replace typing.cast with is not None assertions * Replace batched_commands dict with separate lists * Rename variable to avoid false type warnings * Get rid of type cast by using a new variable * Just ignore the line where type checkers disagree * Remove unused imports * Replace type casts with is not None assertions * Cover missing dispatcher case after refactoring
- Loading branch information
Showing
20 changed files
with
240 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.