Commit c39dec6
committed
fix(sqlalchemy-spanner): instantiate types from _type_map and fix black formatting
_designate_type() was returning type classes instead of instances,
causing isinstance() checks to fail. Handles the mixed _type_map
where most entries are classes but NUMERIC is already an instance
(with precision=38, scale=9). Also adds stacklevel=2 to the
unknown-type warning and reformats test_types.py to pass black.1 parent c2f5788 commit c39dec6
2 files changed
Lines changed: 8 additions & 3 deletions
File tree
- packages/sqlalchemy-spanner
- google/cloud/sqlalchemy_spanner
- tests/unit
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
1251 | | - | |
| 1251 | + | |
| 1252 | + | |
1252 | 1253 | | |
1253 | 1254 | | |
1254 | 1255 | | |
1255 | | - | |
| 1256 | + | |
| 1257 | + | |
1256 | 1258 | | |
1257 | 1259 | | |
1258 | 1260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
0 commit comments