Commit ea0a37c
committed
fix(bigtable): correct get_bigtable_data_client return annotation
The return annotation referenced bigtable.BigtableDataClient, but that
name is not exported from the google.cloud.bigtable top-level namespace
(only Client is). The client is constructed from google.cloud.bigtable.data,
which is where BigtableDataClient actually lives and is already imported.
Because of "from __future__ import annotations" the annotation is a lazy
string, so it does not fail at runtime, but typing.get_type_hints() and doc
tooling raise AttributeError when resolving it. Point the annotation at
data.BigtableDataClient (the type actually returned) and add a regression
test that get_type_hints() resolves it.1 parent 68a7803 commit ea0a37c
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments