2929from . import protocol
3030from . import serverversion
3131from . import transaction
32+ from . import types
3233from . import utils
34+ from .protocol import protocol as _cprotocol
3335
3436if typing .TYPE_CHECKING :
35- from .protocol import protocol as _cprotocol
3637 from . import pool_connection_proxy as _pool
37- from . import types
3838
3939
4040_Connection = typing .TypeVar ('_Connection' , bound = 'Connection[typing.Any]' )
@@ -336,7 +336,7 @@ def get_server_pid(self) -> int:
336336 """Return the PID of the Postgres server the connection is bound to."""
337337 return self ._protocol .get_server_pid ()
338338
339- def get_server_version (self ) -> ' types.ServerVersion' :
339+ def get_server_version (self ) -> types .ServerVersion :
340340 """Return the version of the connected PostgreSQL server.
341341
342342 The returned value is a named tuple similar to that in
@@ -352,7 +352,7 @@ def get_server_version(self) -> 'types.ServerVersion':
352352 """
353353 return self ._server_version
354354
355- def get_settings (self ) -> ' _cprotocol.ConnectionSettings' :
355+ def get_settings (self ) -> _cprotocol .ConnectionSettings :
356356 """Return connection settings.
357357
358358 :return: :class:`~asyncpg.ConnectionSettings`.
@@ -3176,8 +3176,8 @@ class ServerCapabilities(typing.NamedTuple):
31763176
31773177
31783178def _detect_server_capabilities (
3179- server_version : ' types.ServerVersion' ,
3180- connection_settings : ' _cprotocol.ConnectionSettings'
3179+ server_version : types .ServerVersion ,
3180+ connection_settings : _cprotocol .ConnectionSettings
31813181) -> ServerCapabilities :
31823182 if hasattr (connection_settings , 'padb_revision' ):
31833183 # Amazon Redshift detected.
0 commit comments