Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf8d4aaa

Browse files
plamutHemangChothanitswast
authored
feat: add type hints for public methods (#613)
* feat: add type hint for public methods* feat: add bigquery-storage in requirement file* feat: add pandas in requirement file* feat: add return type hint* feat: remove pandas import as a string* Use the latest pytype version (2021.4.9)* Silence false import and module attribute errors* Fix misc. pytype warnings and false postiives* Make changes to generated files persistent* Make final cleanup of client.py* Change import ignores to more specific errors* Silence false positive type warning in job config* Silence noisy _helper type warnings* Silence false positives for resumable media code* Add pytype to nox.options.sessions* Hide for-type-check-only imports behind a flag* Remove obsolete skipIf decorator from two testsinspect.signature() was added in Python 3.3, and the library onlyneeds to suppport Python3.6+.* Install dependencies in pytype sessionThis avoids numerous unnecessary import and module attribute errors,rendering lots of pytype directive comments obsolete.* Be more specific about to_dataframe()'s return type* Add missing return type for _get_query_results()* Be more specific about pandas/pyarrow return types* Exclude typing-only imports from coverage checksCo-authored-by: HemangChothani <hemang.chothani@qlogic.io>Co-authored-by: Tim Swast <swast@google.com>
1 parent34ecc3f commitf8d4aaa

File tree

21 files changed

+575
-331
lines changed

21 files changed

+575
-331
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pip-log.txt
2929
.nox
3030
.cache
3131
.pytest_cache
32+
.pytype
3233

3334

3435
# Mac

‎google/cloud/bigquery/_http.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
importos
1818
importpkg_resources
1919

20-
fromgoogle.cloudimport_http
21-
20+
fromgoogle.cloudimport_http# pytype: disable=import-error
2221
fromgoogle.cloud.bigqueryimport__version__
2322

2423

‎google/cloud/bigquery/_pandas_helpers.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def augment_schema(dataframe, current_bq_schema):
373373
Returns:
374374
Optional[Sequence[google.cloud.bigquery.schema.SchemaField]]
375375
"""
376+
# pytype: disable=attribute-error
376377
augmented_schema= []
377378
unknown_type_fields= []
378379

@@ -406,6 +407,7 @@ def augment_schema(dataframe, current_bq_schema):
406407
returnNone
407408

408409
returnaugmented_schema
410+
# pytype: enable=attribute-error
409411

410412

411413
defdataframe_to_arrow(dataframe,bq_schema):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp