Skip to content
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

feat: add type hints for public methods #613

Merged
merged 23 commits into from Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5f807f0
feat: add type hint for public methods
HemangChothani Dec 22, 2020
6a84a87
feat: add bigquery-storage in requirement file
HemangChothani Dec 22, 2020
887ec27
feat: add pandas in requirement file
HemangChothani Dec 22, 2020
984d8a0
feat: add return type hint
HemangChothani Dec 24, 2020
63a5729
feat: remove pandas import as a string
HemangChothani Dec 28, 2020
c9fd3b7
Use the latest pytype version (2021.4.9)
plamut Apr 15, 2021
61cb93c
Silence false import and module attribute errors
plamut Apr 15, 2021
c17993e
Fix misc. pytype warnings and false postiives
plamut Apr 15, 2021
b76029c
Make changes to generated files persistent
plamut Apr 15, 2021
558163d
Make final cleanup of client.py
plamut Apr 15, 2021
b3a9054
Change import ignores to more specific errors
plamut Apr 15, 2021
5529b34
Silence false positive type warning in job config
plamut Apr 15, 2021
7762366
Silence noisy _helper type warnings
plamut Apr 15, 2021
bf32b2c
Silence false positives for resumable media code
plamut Apr 19, 2021
5f672f9
Add pytype to nox.options.sessions
plamut Apr 19, 2021
0afc6ca
Hide for-type-check-only imports behind a flag
plamut Apr 21, 2021
3bdc7d8
Remove obsolete skipIf decorator from two tests
plamut Apr 21, 2021
8466b33
Install dependencies in pytype session
plamut Apr 21, 2021
dfd4317
Be more specific about to_dataframe()'s return type
plamut Apr 21, 2021
3a449d2
Add missing return type for _get_query_results()
plamut Apr 21, 2021
80820f7
Be more specific about pandas/pyarrow return types
plamut Apr 21, 2021
055d9f5
Exclude typing-only imports from coverage checks
plamut Apr 21, 2021
3c00aa5
Merge branch 'master' into iss-157
tswast Apr 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,6 +29,7 @@ pip-log.txt
.nox
.cache
.pytest_cache
.pytype


# Mac
Expand Down
3 changes: 1 addition & 2 deletions google/cloud/bigquery/_http.py
Expand Up @@ -17,8 +17,7 @@
import os
import pkg_resources

from google.cloud import _http

from google.cloud import _http # pytype: disable=import-error
from google.cloud.bigquery import __version__


Expand Down
2 changes: 2 additions & 0 deletions google/cloud/bigquery/_pandas_helpers.py
Expand Up @@ -373,6 +373,7 @@ def augment_schema(dataframe, current_bq_schema):
Returns:
Optional[Sequence[google.cloud.bigquery.schema.SchemaField]]
"""
# pytype: disable=attribute-error
augmented_schema = []
unknown_type_fields = []

Expand Down Expand Up @@ -406,6 +407,7 @@ def augment_schema(dataframe, current_bq_schema):
return None

return augmented_schema
# pytype: enable=attribute-error


def dataframe_to_arrow(dataframe, bq_schema):
Expand Down