diff --git a/.github/workflows/scripts/register_flows.py b/.github/workflows/scripts/register_flows.py index 14b469bb9..121a6eda2 100644 --- a/.github/workflows/scripts/register_flows.py +++ b/.github/workflows/scripts/register_flows.py @@ -91,7 +91,11 @@ def build_and_register( # pylint: disable=too-many-branches while attempts < max_retries: attempts += 1 try: - (flow_id, flow_version, is_new,) = register_serialized_flow( + ( + flow_id, + flow_version, + is_new, + ) = register_serialized_flow( client=client, serialized_flow=serialized_flow, project_id=project_id, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a2f4ca59b..c1ba2339a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files # prevents adding large files - id: detect-private-key # detects private keys @@ -10,17 +10,17 @@ repos: - id: trailing-whitespace # prevents trailing whitespace - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 25.1.0 hooks: - id: black language_version: python3.10 - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 6.0.0 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.1.1 hooks: - id: flake8 \ No newline at end of file diff --git a/pipelines/migration/br_rj_riodejaneiro_rdo/tasks.py b/pipelines/migration/br_rj_riodejaneiro_rdo/tasks.py index ca3aec20d..a2ef13227 100644 --- a/pipelines/migration/br_rj_riodejaneiro_rdo/tasks.py +++ b/pipelines/migration/br_rj_riodejaneiro_rdo/tasks.py @@ -119,9 +119,9 @@ def download_and_save_local_from_ftp(file_info: dict, dataset_id: str = None, ta base_path = f'{os.getcwd()}/{os.getenv("DATA_FOLDER", "data")}/{{bucket_mode}}/{dataset_id}' # Set general local path to save file (bucket_modes: raw or staging) - file_info[ - "local_path" - ] = f"""{base_path}/{table_id}/{file_info["partitions"]}/{file_info['filename']}.{{file_ext}}""" + file_info["local_path"] = ( + f"""{base_path}/{table_id}/{file_info["partitions"]}/{file_info['filename']}.{{file_ext}}""" + ) # Get raw data file_info["raw_path"] = file_info["local_path"].format(bucket_mode="raw", file_ext="txt") diff --git a/pipelines/migration/projeto_subsidio_sppo/tasks.py b/pipelines/migration/projeto_subsidio_sppo/tasks.py index 867c09ffb..ae2606246 100644 --- a/pipelines/migration/projeto_subsidio_sppo/tasks.py +++ b/pipelines/migration/projeto_subsidio_sppo/tasks.py @@ -67,9 +67,9 @@ def subsidio_data_quality_check( request_params["dataset_id"] = constants.SUBSIDIO_SPPO_DASHBOARD_DATASET_ID.value if gte_result: request_params["dataset_id_v2"] = constants.SUBSIDIO_SPPO_DASHBOARD_V2_DATASET_ID.value - request_params[ - "table_id_v2" - ] = constants.SUBSIDIO_SPPO_DASHBOARD_SUMARIO_TABLE_ID_V2.value + request_params["table_id_v2"] = ( + constants.SUBSIDIO_SPPO_DASHBOARD_SUMARIO_TABLE_ID_V2.value + ) else: request_params["dataset_id_v2"] = constants.SUBSIDIO_SPPO_DASHBOARD_DATASET_ID.value request_params["table_id_v2"] = constants.SUBSIDIO_SPPO_DASHBOARD_SUMARIO_TABLE_ID.value