Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 26, 2023
1 parent 9b937bf commit 1bbdd88
Show file tree
Hide file tree
Showing 61 changed files with 33 additions and 83 deletions.
1 change: 0 additions & 1 deletion .github/workflows/scripts/register_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
)
import glob
import hashlib
import importlib
import json
import os
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_anatel_banda_larga_fixa/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Schedules for dataset br_anatel_banda_larga_fixa
"""

from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock
from prefect.schedules.clocks import IntervalClock
Expand Down
2 changes: 0 additions & 2 deletions pipelines/datasets/br_anatel_banda_larga_fixa/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"""
import pandas as pd
import numpy as np
from zipfile import ZipFile
from pathlib import Path
import os

from datetime import datetime, timedelta
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_anatel_banda_larga_fixa/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import os
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
from pathlib import Path


Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_anatel_telefonia_movel/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Schedules for dataset br_anatel_telefonia_movel
"""
from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import IntervalClock
from pipelines.constants import constants
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_anatel_telefonia_movel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import os
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
from pathlib import Path


Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_anp_precos_combustiveis/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Schedules for br_anp_precos_combustiveis
"""

from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock
from pipelines.constants import constants
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_ans_beneficiario/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""


from datetime import datetime, timedelta
from datetime import timedelta
from prefect.run_configs import KubernetesRun
from prefect.storage import GCS
from pipelines.constants import constants
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_ans_beneficiario/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""


from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from pipelines.constants import constants
from prefect.schedules.clocks import CronClock
Expand Down
5 changes: 0 additions & 5 deletions pipelines/datasets/br_ans_beneficiario/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
from bs4 import BeautifulSoup
import re
import pandas as pd
from multiprocessing import Pool
from datetime import datetime
from loguru import logger
from pathlib import Path
from functools import reduce
from prefect import task
import os
from tqdm import tqdm
import zipfile
import requests
from glob import glob
from pipelines.datasets.br_ans_beneficiario.utils import (
download_unzip_csv,
get_url_from_template,
Expand Down
4 changes: 0 additions & 4 deletions pipelines/datasets/br_ans_beneficiario/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@

# from multiprocessing import Pool
from loguru import logger
from pathlib import Path


from datetime import datetime
from io import BytesIO
import os
from tqdm import tqdm

# import tempfile
from pipelines.datasets.br_ans_beneficiario.constants import constants as ans_constants
import zipfile
import requests
from functools import reduce
from dateutil.relativedelta import relativedelta
from pipelines.utils.utils import (
log,
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_b3_cotacoes/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from enum import Enum
from datetime import datetime, timedelta


class constants(Enum): # pylint: disable=c0103
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_b3_cotacoes/schedules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock
from pipelines.constants import constants
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_bcb_agencia/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os
import pandas as pd
from datetime import timedelta, datetime
from datetime import timedelta

from pipelines.datasets.br_bcb_agencia.constants import (
constants as agencia_constants,
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_bcb_estban/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_bcb_estban
"""

from datetime import datetime, timedelta
from datetime import timedelta
from prefect.run_configs import KubernetesRun
from prefect.storage import GCS
from prefect import Parameter, case
Expand Down
3 changes: 1 addition & 2 deletions pipelines/datasets/br_bcb_estban/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
import pandas as pd
import os
import basedosdados as bd
import glob

from pipelines.constants import constants
from pipelines.datasets.br_bcb_estban.constants import (
constants as br_bcb_estban_constants,
)
from datetime import datetime, timedelta
from datetime import timedelta

from pipelines.utils.utils import (
clean_dataframe,
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_bcb_taxa_cambio/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Tasks for br_bcb_indicadores
"""

import datetime
from pipelines.utils.utils import log, to_partitions
from prefect import task
import pandas as pd
Expand Down
3 changes: 1 addition & 2 deletions pipelines/datasets/br_bcb_taxa_cambio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
import pandas as pd
import datetime
import pytz
from datetime import timedelta
import os
from io import BytesIO, StringIO
from io import BytesIO
import time as tm
from pipelines.datasets.br_bcb_taxa_cambio.constants import constants as bcb_constants
from pipelines.utils.utils import log
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_bd_indicadores/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_bd_indicadores
"""
# pylint: disable=invalid-name
from datetime import timedelta, datetime
from datetime import timedelta

from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Flows for br_cgu_terceirizados
"""
from datetime import datetime, timedelta
from datetime import timedelta

from prefect.run_configs import KubernetesRun
from prefect.storage import GCS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_cvm_administradores_carteira
"""
# pylint: disable=C0103, E1123, invalid-name
from datetime import datetime, timedelta
from datetime import timedelta

from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from prefect import task
from unidecode import unidecode
import basedosdados as bd
from datetime import datetime
from pipelines.utils.utils import log


Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_cvm_fi/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Schedules for br_cvm_fi
"""

from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import IntervalClock
from pipelines.constants import constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_cvm_oferta_publica_distribuicao
"""
# pylint: disable=C0103, E1123, invalid-name
from datetime import datetime, timedelta
from datetime import timedelta

from prefect.run_configs import KubernetesRun
from prefect.storage import GCS
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_fgv_igp/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

# pylint: disable=invalid-name
from datetime import timedelta, datetime
from datetime import timedelta
from pathlib import Path

from prefect import Parameter, case
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_ibge_pnadc/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import pandas as pd
import numpy as np
from prefect import task
from datetime import datetime

from pipelines.utils.utils import log
from pipelines.datasets.br_ibge_pnadc.constants import constants as pnad_constants
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_inmet_bdmep/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
###############################################################################


from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from prefect.schedules.clocks import IntervalClock
from pipelines.constants import constants
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_inmet_bdmep/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import os
import numpy as np
import glob
from datetime import datetime, time
from prefect import task
from pipelines.datasets.br_inmet_bdmep.constants import constants as inmet_constants

Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_me_cnpj/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

###############################################################################
from prefect.schedules.clocks import CronClock
from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule
from pipelines.constants import constants

Expand Down
3 changes: 1 addition & 2 deletions pipelines/datasets/br_me_cnpj/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
)
import os
import requests
import zipfile
import pandas as pd
from datetime import datetime, timedelta
from datetime import datetime
from tqdm import tqdm

ufs = constants_cnpj.UFS.value
Expand Down
2 changes: 0 additions & 2 deletions pipelines/datasets/br_me_cnpj/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from tqdm import tqdm
import pyarrow.parquet as pq
import pyarrow as pa
import csv
from typing import List

ufs = constants_cnpj.UFS.value
headers = constants_cnpj.HEADERS.value
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_me_comex_stat/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_me_comex_stat
"""
# pylint: disable=invalid-name
from datetime import datetime, timedelta
from datetime import timedelta

from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_me_comex_stat/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Schedules for br_me_comex_stat
"""

from datetime import timedelta, datetime
from datetime import datetime
from prefect.schedules import Schedule, filters, adjustments
from prefect.schedules.clocks import CronClock

Expand Down
4 changes: 0 additions & 4 deletions pipelines/datasets/br_me_comex_stat/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
Tasks for br_me_comex_stat
"""
# pylint: disable=invalid-name,too-many-nested-blocks
from glob import glob
from zipfile import ZipFile
import time as tm
from datetime import timedelta
import pandas as pd
import numpy as np
from prefect import task
from pathlib import Path
from typing import Union, List
import basedosdados as bd
import os

Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_mg_belohorizonte_smfa_iptu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import requests
from bs4 import BeautifulSoup
import numpy as np
from datetime import datetime
import geopandas as gpd
from shapely import wkt
from pipelines.utils.tasks import log
Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_ms_cnes/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_ms_cnes
"""
# pylint: disable=invalid-name
from datetime import datetime, timedelta
from datetime import timedelta

from prefect import Parameter, case
from pipelines.constants import constants
Expand Down
4 changes: 1 addition & 3 deletions pipelines/datasets/br_ms_cnes/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@


from prefect import task
from datetime import timedelta, datetime
from datetime import timedelta
from pipelines.utils.utils import log
from pipelines.constants import constants

import pandas as pd
from ftplib import FTP
import wget
import os
from rpy2.robjects.packages import importr
import rpy2.robjects.packages as rpackages
import rpy2.robjects as ro
from rpy2.robjects import pandas2ri

import datetime as dt

from pipelines.datasets.br_ms_cnes.constants import constants as cnes_constants
from pipelines.datasets.br_ms_cnes.utils import (
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_ms_cnes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ftplib import FTP
import pandas as pd
import basedosdados as bd
from datetime import datetime
from pipelines.utils.utils import log


Expand Down
2 changes: 1 addition & 1 deletion pipelines/datasets/br_ons_avaliacao_operacao/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Flows for br_ons_avaliacao_operacao
"""
# pylint: disable=invalid-name
from datetime import datetime, timedelta
from datetime import timedelta

from prefect import Parameter, case
from prefect.run_configs import KubernetesRun
Expand Down
1 change: 0 additions & 1 deletion pipelines/datasets/br_ons_avaliacao_operacao/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""
import os
import pandas as pd
from datetime import datetime

from prefect import task
from pipelines.utils.utils import (
Expand Down
Loading

0 comments on commit 1bbdd88

Please sign in to comment.