-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(pandas-gbq): add Ruff format session and implement mypy #17041
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
Changes from all commits
d93c06f
26005ca
b5f60c2
37ca159
0bdaa06
7c74456
1a3912d
96c7645
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,8 @@ | |
| from __future__ import annotations | ||
|
|
||
| import typing | ||
| from typing import Any, Dict, Optional, Sequence | ||
| import warnings | ||
| from typing import Any, Dict, Optional, Sequence | ||
|
|
||
| import google.cloud.bigquery | ||
| import google.cloud.bigquery.table | ||
|
|
@@ -34,7 +34,10 @@ def _bqschema_to_nullsafe_dtypes(schema_fields): | |
| See: http://pandas.pydata.org/pandas-docs/dev/missing_data.html | ||
| #missing-data-casting-rules-and-indexing | ||
| """ | ||
| import db_dtypes | ||
| # db-dtypes does not have type hints nor stubs that mypy uses for type checking. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please can you include a link to a tracking bug in google-cloud-python to follow up on this? Applies throughout for all the packages in this PR that don't have type hints
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| # Remove this comment and the ignore pragma upon completing: | ||
| # https://github.com/googleapis/google-cloud-python/issues/17045 | ||
| import db_dtypes # type: ignore[import-untyped] | ||
|
|
||
| # If you update this mapping, also update the table at | ||
| # `docs/reading.rst`. | ||
|
|
@@ -79,7 +82,10 @@ def _finalize_dtypes( | |
| 1970. See: | ||
| https://github.com/googleapis/python-bigquery-pandas/issues/365 | ||
| """ | ||
| import db_dtypes | ||
| # db-dtypes does not have type hints nor stubs that mypy uses for type checking. | ||
| # Remove this comment and the ignore pragma upon completing: | ||
| # https://github.com/googleapis/google-cloud-python/issues/17045 | ||
| import db_dtypes # type: ignore[import-untyped] | ||
| import pandas.api.types | ||
|
|
||
| # If you update this mapping, also update the table at | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.