noting why type is ignored

This commit is contained in:
David Kennedy 2024-03-05 14:50:20 -05:00
parent a75caa2fdb
commit 6e13345161
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -62,6 +62,8 @@ class EPPLibWrapper:
client. Raises errors if initialization fails. client. Raises errors if initialization fails.
This method will be called at app initialization, and also during retries.""" This method will be called at app initialization, and also during retries."""
# establish a client object with a TCP socket transport # establish a client object with a TCP socket transport
# note that type: ignore added in several places because linter complains
# about _client initially being set to None, and None type doesn't match code
self._client = Client( # type: ignore self._client = Client( # type: ignore
SocketTransport( SocketTransport(
settings.SECRET_REGISTRY_HOSTNAME, settings.SECRET_REGISTRY_HOSTNAME,
@ -73,9 +75,9 @@ class EPPLibWrapper:
try: try:
# use the _client object to connect # use the _client object to connect
self._client.connect() # type: ignore self._client.connect() # type: ignore
response = self._client.send(self._login) # type:ignore response = self._client.send(self._login) # type: ignore
if response.code >= 2000: # type: ignore if response.code >= 2000: # type: ignore
self._client.close() # type:ignore self._client.close() # type: ignore
raise LoginError(response.msg) # type: ignore raise LoginError(response.msg) # type: ignore
except TransportError as err: except TransportError as err:
message = "_initialize_client failed to execute due to a connection error." message = "_initialize_client failed to execute due to a connection error."