1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

companion: Fix class Session docstring

This is *not* only for the Frontier oAuth2 authn, it's also for the
actual CAPI queries.
This commit is contained in:
Athanasius 2021-08-16 13:38:48 +01:00
parent e0f3787a31
commit 7339cc59ed
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

View File

@ -464,7 +464,7 @@ class Auth(object):
class Session(object):
"""Methods for handling an oAuth2 session."""
"""Methods for handling Frontier Auth and CAPI queries."""
STATE_INIT, STATE_AUTH, STATE_OK = list(range(3))
@ -553,7 +553,7 @@ class Session(object):
self.session.headers['User-Agent'] = USER_AGENT
self.state = Session.STATE_OK
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001
def query(self, endpoint: str) -> CAPIData: # noqa: CCR001, C901
"""Perform a query against the specified CAPI endpoint."""
logger.trace_if('capi.query', f'Performing query for endpoint "{endpoint}"')
if self.state == Session.STATE_INIT: