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
chore: ensure mypy passes for package #242
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5906cef
chore: ensure mypy passes
crwilcox fe5961a
🦉 Updates from OwlBot
gcf-owl-bot[bot] 6d3049c
chore: flake8 doesn't like lambdas
crwilcox 47182b9
chore: merge
crwilcox 96845a2
test: add mypy test scenarioa
crwilcox 71e66fc
🦉 Updates from OwlBot
gcf-owl-bot[bot] 4253cdb
chore: scope mypy to google.cloud.datastore for now
crwilcox 37c3a04
chore: remove api_core ignores, quiet a mypy error by import rename
crwilcox d6b600a
fix: drop unneded extra function
tseaver File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[mypy] | ||
python_version = 3.6 | ||
namespace_packages = True | ||
ignore_missing_imports = True | ||
|
||
[mypy-google.protobuf] | ||
ignore_missing_imports = True |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this just a function?
And maybe it should raise an exception, since the only reason we're here is that gRPC is disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a lambda but flake8 isn't a fan and I am not going to protest loudly about it. This is a minimal change that ensures make_datastore_api is consistently a callable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just don't see the point in defining the
no_datastore_api
function, only to alias it asmake_datastore_api
-- just name the functionmake_datastore_api
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it, but if you do that you end up fighting with
google/cloud/datastore/client.py:41: error: All conditional function variants must have identical signatures
:\ This seems not terrible?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed d6b600a, which passes mypy, and removes the extra
no_database_api
function.