|
6 | 6 |
|
7 | 7 |
|
8 | 8 | import typing
|
9 |
| - |
10 |
| -from . import compat |
| 9 | +import typing_extensions |
11 | 10 |
|
12 | 11 | if typing.TYPE_CHECKING:
|
13 | 12 | from . import protocol
|
14 | 13 |
|
15 | 14 |
|
16 |
| -_TYPEINFO_13: compat.Final = '''\ |
| 15 | +_TYPEINFO_13: typing_extensions.Final = '''\ |
17 | 16 | (
|
18 | 17 | SELECT
|
19 | 18 | t.oid AS oid,
|
|
90 | 89 | '''
|
91 | 90 |
|
92 | 91 |
|
93 |
| -INTRO_LOOKUP_TYPES_13: compat.Final = '''\ |
| 92 | +INTRO_LOOKUP_TYPES_13: typing_extensions.Final = '''\ |
94 | 93 | WITH RECURSIVE typeinfo_tree(
|
95 | 94 | oid, ns, name, kind, basetype, elemtype, elemdelim,
|
96 | 95 | range_subtype, attrtypoids, attrnames, depth)
|
|
132 | 131 | '''.format(typeinfo=_TYPEINFO_13)
|
133 | 132 |
|
134 | 133 |
|
135 |
| -_TYPEINFO: compat.Final = '''\ |
| 134 | +_TYPEINFO: typing_extensions.Final = '''\ |
136 | 135 | (
|
137 | 136 | SELECT
|
138 | 137 | t.oid AS oid,
|
|
214 | 213 | '''
|
215 | 214 |
|
216 | 215 |
|
217 |
| -INTRO_LOOKUP_TYPES: compat.Final = '''\ |
| 216 | +INTRO_LOOKUP_TYPES: typing_extensions.Final = '''\ |
218 | 217 | WITH RECURSIVE typeinfo_tree(
|
219 | 218 | oid, ns, name, kind, basetype, elemtype, elemdelim,
|
220 | 219 | range_subtype, attrtypoids, attrnames, depth)
|
|
256 | 255 | '''.format(typeinfo=_TYPEINFO)
|
257 | 256 |
|
258 | 257 |
|
259 |
| -TYPE_BY_NAME: compat.Final = '''\ |
| 258 | +TYPE_BY_NAME: typing_extensions.Final = '''\ |
260 | 259 | SELECT
|
261 | 260 | t.oid,
|
262 | 261 | t.typelem AS elemtype,
|
|
269 | 268 | '''
|
270 | 269 |
|
271 | 270 |
|
272 |
| -TYPE_BY_OID: compat.Final = '''\ |
| 271 | +TYPE_BY_OID: typing_extensions.Final = '''\ |
273 | 272 | SELECT
|
274 | 273 | t.oid,
|
275 | 274 | t.typelem AS elemtype,
|
|
282 | 281 |
|
283 | 282 |
|
284 | 283 | # 'b' for a base type, 'd' for a domain, 'e' for enum.
|
285 |
| -SCALAR_TYPE_KINDS: compat.Final = (b'b', b'd', b'e') |
| 284 | +SCALAR_TYPE_KINDS: typing_extensions.Final = (b'b', b'd', b'e') |
286 | 285 |
|
287 | 286 |
|
288 | 287 | def is_scalar_type(typeinfo: 'protocol.Record') -> bool:
|
|
0 commit comments