Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit babf0d1

Browse files
committed
Add a section on typee annotations
1 parent 28d7f28 commit babf0d1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

UPGRADING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@ table from the job's configuration. Destination table for the query can thus be
117117
explicitly defined by the user.
118118

119119

120+
## Type Annotations
121+
122+
The library is now type-annotated and declares itself as such. If you use a static
123+
type checker such as `mypy`, you might start getting errors in places where
124+
`google-cloud-bigquery` package is used.
125+
126+
It is recommended to update your code and/or type annotations to fix these errors, but
127+
if this is not feasible in the short term, you can temporarily ignore type annotations
128+
in `google-cloud-bigquery`, for example by using a special `# type: ignore` comment:
129+
130+
```py
131+
from google.cloud import bigquery # type: ignore
132+
```
133+
134+
But again, this is only recommended as a possible short-term workaround if immediately
135+
fixing the type check errors in your project is not feasible.
136+
137+
120138
# 2.0.0 Migration Guide
121139

122140
The 2.0 release of the `google-cloud-bigquery` client drops support for Python

0 commit comments

Comments
 (0)