29
29
from . import protocol
30
30
from . import serverversion
31
31
from . import transaction
32
+ from . import types
32
33
from . import utils
34
+ from .protocol import protocol as _cprotocol
33
35
34
36
if typing .TYPE_CHECKING :
35
- from .protocol import protocol as _cprotocol
36
37
from . import pool_connection_proxy as _pool
37
- from . import types
38
38
39
39
40
40
_Connection = typing .TypeVar ('_Connection' , bound = 'Connection[typing.Any]' )
@@ -336,7 +336,7 @@ def get_server_pid(self) -> int:
336
336
"""Return the PID of the Postgres server the connection is bound to."""
337
337
return self ._protocol .get_server_pid ()
338
338
339
- def get_server_version (self ) -> ' types.ServerVersion' :
339
+ def get_server_version (self ) -> types .ServerVersion :
340
340
"""Return the version of the connected PostgreSQL server.
341
341
342
342
The returned value is a named tuple similar to that in
@@ -352,7 +352,7 @@ def get_server_version(self) -> 'types.ServerVersion':
352
352
"""
353
353
return self ._server_version
354
354
355
- def get_settings (self ) -> ' _cprotocol.ConnectionSettings' :
355
+ def get_settings (self ) -> _cprotocol .ConnectionSettings :
356
356
"""Return connection settings.
357
357
358
358
:return: :class:`~asyncpg.ConnectionSettings`.
@@ -3176,8 +3176,8 @@ class ServerCapabilities(typing.NamedTuple):
3176
3176
3177
3177
3178
3178
def _detect_server_capabilities (
3179
- server_version : ' types.ServerVersion' ,
3180
- connection_settings : ' _cprotocol.ConnectionSettings'
3179
+ server_version : types .ServerVersion ,
3180
+ connection_settings : _cprotocol .ConnectionSettings
3181
3181
) -> ServerCapabilities :
3182
3182
if hasattr (connection_settings , 'padb_revision' ):
3183
3183
# Amazon Redshift detected.
0 commit comments