chore: ran linting

This commit is contained in:
Anish Sarkar 2026-03-21 13:20:13 +05:30
parent 772150eb66
commit de8841fb86
110 changed files with 2673 additions and 1918 deletions

View file

@ -190,7 +190,9 @@ class ConfluenceHistoryConnector:
)
# Lazy import to avoid circular dependency
from app.routes.confluence_add_connector_route import refresh_confluence_token
from app.routes.confluence_add_connector_route import (
refresh_confluence_token,
)
connector = await refresh_confluence_token(self._session, connector)
@ -375,13 +377,9 @@ class ConfluenceHistoryConnector:
url, headers=headers, json=json_payload, params=params
)
elif method_upper == "DELETE":
response = await http_client.delete(
url, headers=headers, params=params
)
response = await http_client.delete(url, headers=headers, params=params)
else:
response = await http_client.get(
url, headers=headers, params=params
)
response = await http_client.get(url, headers=headers, params=params)
response.raise_for_status()
if response.status_code == 204 or not response.text:

View file

@ -60,9 +60,7 @@ class GoogleCalendarConnector:
has_standard_refresh = bool(self._credentials.refresh_token)
if has_standard_refresh:
if not all(
[self._credentials.client_id, self._credentials.client_secret]
):
if not all([self._credentials.client_id, self._credentials.client_secret]):
raise ValueError(
"Google OAuth credentials (client_id, client_secret) must be set"
)

View file

@ -89,9 +89,7 @@ class GoogleGmailConnector:
has_standard_refresh = bool(self._credentials.refresh_token)
if has_standard_refresh:
if not all(
[self._credentials.client_id, self._credentials.client_secret]
):
if not all([self._credentials.client_id, self._credentials.client_secret]):
raise ValueError(
"Google OAuth credentials (client_id, client_secret) must be set"
)
@ -139,17 +137,13 @@ class GoogleGmailConnector:
from app.utils.oauth_security import TokenEncryption
creds_dict = json.loads(self._credentials.to_json())
token_encrypted = connector.config.get(
"_token_encrypted", False
)
token_encrypted = connector.config.get("_token_encrypted", False)
if token_encrypted and config.SECRET_KEY:
token_encryption = TokenEncryption(config.SECRET_KEY)
if creds_dict.get("token"):
creds_dict["token"] = (
token_encryption.encrypt_token(
creds_dict["token"]
)
creds_dict["token"] = token_encryption.encrypt_token(
creds_dict["token"]
)
if creds_dict.get("refresh_token"):
creds_dict["refresh_token"] = (