diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7931b10506..5fdd3fa027 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: description: Detect hardcoded secrets pre-commit using Gitleaks entry: gitleaks protect --verbose --no-banner --redact --staged language: system - stages: [commit] + stages: [pre-commit] - id: gitleaks-pre-push # To use this pre-push hook, run @@ -20,4 +20,4 @@ repos: description: Detect hardcoded secrets pre-push using Gitleaks entry: gitleaks detect --verbose --no-banner --redact --log-opts "origin..HEAD" language: system - stages: [push] + stages: [pre-push] diff --git a/src/fides/api/models/connectionconfig.py b/src/fides/api/models/connectionconfig.py index 1758222b88..2dc518cd44 100644 --- a/src/fides/api/models/connectionconfig.py +++ b/src/fides/api/models/connectionconfig.py @@ -220,10 +220,13 @@ def authorized(self) -> bool: return False # hard-coding to avoid cyclic dependency - if authentication.strategy not in ["oauth2_authorization_code", "oauth2_client_credentials"]: + if authentication.strategy not in [ + "oauth2_authorization_code", + "oauth2_client_credentials", + ]: return False - return bool(self.secrets and 'access_token' in self.secrets.keys()) + return bool(self.secrets and "access_token" in self.secrets.keys()) @property def name_or_key(self) -> str: diff --git a/src/fides/api/schemas/custom_report.py b/src/fides/api/schemas/custom_report.py index be26705a21..0a55ccb016 100644 --- a/src/fides/api/schemas/custom_report.py +++ b/src/fides/api/schemas/custom_report.py @@ -35,12 +35,20 @@ class CustomReportConfig(FidesSchema): default_factory=dict, description="A map between column keys and custom labels" ) - @computed_field + @computed_field # type: ignore[misc] @property def columns_to_skip(self) -> Set[str]: - return {key for key, value in self.column_map.items() if value.enabled is False} + return { + key + for key, value in self.column_map.items() # pylint: disable=no-member + if value.enabled is False + } - @computed_field + @computed_field # type: ignore[misc] @property def custom_column_labels(self) -> Dict[str, str]: - return {key: value.label for key, value in self.column_map.items() if value.label} + return { + key: value.label + for key, value in self.column_map.items() # pylint: disable=no-member + if value.label + }