Skip to content

Commit

Permalink
sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Sep 7, 2024
1 parent b7ca6c0 commit cf0a304
Show file tree
Hide file tree
Showing 198 changed files with 690 additions and 516 deletions.
5 changes: 3 additions & 2 deletions parsons/actblue/actblue.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import logging
import time
from parsons.utilities.api_connector import APIConnector
from parsons.utilities import check_env

from parsons.etl import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector

logger = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion parsons/action_builder/action_builder.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import json
import logging

from parsons import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector
import logging

logger = logging.getLogger(__name__)

Expand Down
5 changes: 3 additions & 2 deletions parsons/action_kit/action_kit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import json
import logging
import requests
import time
import math
import time

import requests

from parsons.etl.table import Table
from parsons.utilities import check_env
Expand Down
1 change: 1 addition & 0 deletions parsons/action_network/action_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import warnings
from typing import Dict, List, Union

from parsons import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector
Expand Down
5 changes: 3 additions & 2 deletions parsons/airtable/airtable.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import logging

from pyairtable import Api as client

from parsons.etl import Table
from parsons.utilities import check_env
import logging


logger = logging.getLogger(__name__)

Expand Down
2 changes: 2 additions & 0 deletions parsons/alchemer/alchemer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import logging

import surveygizmo

from parsons.etl import Table
from parsons.utilities import check_env

Expand Down
1 change: 1 addition & 0 deletions parsons/auth0/auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time

import requests

from parsons.etl.table import Table
from parsons.utilities import check_env

Expand Down
4 changes: 2 additions & 2 deletions parsons/aws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from parsons.aws.s3 import S3
from parsons.aws.lambda_distribute import distribute_task
from parsons.aws.aws_async import event_command
from parsons.aws.lambda_distribute import distribute_task
from parsons.aws.s3 import S3

__all__ = ["S3", "distribute_task", "event_command"]
1 change: 0 additions & 1 deletion parsons/aws/aws_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import boto3


"""
In lambda handler:
Expand Down
11 changes: 4 additions & 7 deletions parsons/aws/lambda_distribute.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import csv
from io import TextIOWrapper, BytesIO, StringIO
import logging
import sys
import traceback
import time
import traceback
from io import BytesIO, StringIO, TextIOWrapper

from parsons.aws.aws_async import (
get_func_task_path,
import_and_get_task,
run as maybe_async_run,
)
from parsons.aws.aws_async import get_func_task_path, import_and_get_task
from parsons.aws.aws_async import run as maybe_async_run
from parsons.aws.s3 import S3
from parsons.etl.table import Table
from parsons.utilities.check_env import check
Expand Down
5 changes: 3 additions & 2 deletions parsons/aws/s3.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import logging
import os
import re

import boto3
from botocore.client import ClientError

from parsons.utilities import files
import logging
import os

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion parsons/azure/azure_blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from azure.core.exceptions import ResourceNotFoundError
from azure.storage.blob import BlobServiceClient, ContentSettings, generate_blob_sas

from parsons.utilities import check_env, files

logger = logging.getLogger(__name__)
Expand Down
4 changes: 3 additions & 1 deletion parsons/bill_com/bill_com.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import requests
import json

import requests

from parsons import Table


Expand Down
5 changes: 3 additions & 2 deletions parsons/bloomerang/bloomerang.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import json
import requests
import logging

import requests

from parsons.etl import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector
from parsons.etl import Table

logger = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions parsons/box/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
"""

import logging
import tempfile

import boxsdk

from parsons.etl.table import Table
from parsons.utilities.check_env import check as check_env
from parsons.utilities.files import create_temp_file, create_temp_file_for_path

import tempfile

logger = logging.getLogger(__name__)

DEFAULT_FOLDER_ID = "0"
Expand Down
1 change: 0 additions & 1 deletion parsons/braintree/braintree.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging

import braintree

from parsons.etl.table import Table
from parsons.utilities.check_env import check as check_env

Expand Down
4 changes: 3 additions & 1 deletion parsons/capitol_canary/capitol_canary.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import logging

from requests.auth import HTTPBasicAuth

from parsons.etl import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector
from parsons.utilities.datetime import date_to_timestamp
import logging

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion parsons/catalist/catalist.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import tempfile
import time
import urllib
from typing import Optional, Union, Dict, List
from typing import Dict, List, Optional, Union
from zipfile import ZipFile

from parsons.etl import Table
Expand Down
5 changes: 3 additions & 2 deletions parsons/census/census.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import logging
from parsons.utilities.api_connector import APIConnector
from parsons.utilities import check_env

from parsons import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector

logger = logging.getLogger(__name__)

Expand Down
5 changes: 3 additions & 2 deletions parsons/community/community.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import logging
from parsons.utilities.api_connector import APIConnector
from parsons.utilities import check_env

from parsons.etl import Table
from parsons.utilities import check_env
from parsons.utilities.api_connector import APIConnector

logger = logging.getLogger(__name__)

Expand Down
8 changes: 5 additions & 3 deletions parsons/copper/copper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from requests import request
import math
import json
import logging
import math
import time

from requests import request

from parsons.etl import Table
from parsons.utilities import check_env
import logging

logger = logging.getLogger(__name__)

Expand Down
6 changes: 4 additions & 2 deletions parsons/crowdtangle/crowdtangle.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from requests import request
import logging
import time

from requests import request

from parsons.etl import Table
from parsons.utilities import check_env
import logging

logger = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion parsons/databases/alchemy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from sqlalchemy import create_engine, Table, MetaData
import logging

from sqlalchemy import MetaData, Table, create_engine

logger = logging.getLogger(__name__)


Expand Down
3 changes: 2 additions & 1 deletion parsons/databases/database/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import parsons.databases.database.constants as consts
import logging

import parsons.databases.database.constants as consts

logger = logging.getLogger(__name__)


Expand Down
1 change: 1 addition & 0 deletions parsons/databases/database_connector.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from abc import ABC, abstractmethod
from typing import Optional

from parsons.etl.table import Table


Expand Down
4 changes: 2 additions & 2 deletions parsons/databases/discover_database.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os
from typing import Optional, Union, Type, List
from typing import List, Optional, Type, Union

from parsons.databases.database_connector import DatabaseConnector
from parsons.databases.redshift import Redshift
from parsons.databases.mysql import MySQL
from parsons.databases.postgres import Postgres
from parsons.databases.redshift import Redshift
from parsons.google.google_bigquery import GoogleBigQuery as BigQuery


Expand Down
7 changes: 4 additions & 3 deletions parsons/databases/mysql/create_table.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from parsons.databases.database.database import DatabaseCreateStatement
import parsons.databases.mysql.constants as consts
import logging

import petl
import logging

import parsons.databases.mysql.constants as consts
from parsons.databases.database.database import DatabaseCreateStatement

logger = logging.getLogger(__name__)

Expand Down
19 changes: 10 additions & 9 deletions parsons/databases/mysql/mysql.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
from parsons import Table
from parsons.utilities import check_env
import petl
import mysql.connector as mysql
from contextlib import contextmanager
from parsons.utilities import files
import pickle
import logging
import os
import pickle
from contextlib import contextmanager

import mysql.connector as mysql
import petl

from parsons import Table
from parsons.databases.alchemy import Alchemy
from parsons.databases.database_connector import DatabaseConnector
from parsons.databases.table import BaseTable
from parsons.databases.mysql.create_table import MySQLCreateTable
from parsons.databases.alchemy import Alchemy
from parsons.databases.table import BaseTable
from parsons.utilities import check_env, files

# Max number of rows that we query at a time, so we can avoid loading huge
# data sets into memory.
Expand Down
10 changes: 5 additions & 5 deletions parsons/databases/postgres/postgres.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from parsons.databases.postgres.postgres_core import PostgresCore
from parsons.databases.table import BaseTable
from parsons.databases.alchemy import Alchemy
from parsons.databases.database_connector import DatabaseConnector
from parsons.etl.table import Table
import logging
import os

from parsons.databases.alchemy import Alchemy
from parsons.databases.database_connector import DatabaseConnector
from parsons.databases.postgres.postgres_core import PostgresCore
from parsons.databases.table import BaseTable
from parsons.etl.table import Table

logger = logging.getLogger(__name__)

Expand Down
10 changes: 6 additions & 4 deletions parsons/databases/postgres/postgres_core.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import logging
import pickle
from contextlib import contextmanager
from typing import Optional

import petl
import psycopg2
import psycopg2.extras

from parsons.databases.postgres.postgres_create_statement import PostgresCreateStatement
from parsons.etl.table import Table
from parsons.utilities import files
import pickle
import petl
import logging
from parsons.databases.postgres.postgres_create_statement import PostgresCreateStatement

# Max number of rows that we query at a time, so we can avoid loading huge
# data sets into memory.
Expand Down
7 changes: 4 additions & 3 deletions parsons/databases/postgres/postgres_create_statement.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from parsons.databases.database.database import DatabaseCreateStatement
import parsons.databases.postgres.constants as consts
import logging

import petl
import logging

import parsons.databases.postgres.constants as consts
from parsons.databases.database.database import DatabaseCreateStatement

logger = logging.getLogger(__name__)

Expand Down
Loading

0 comments on commit cf0a304

Please sign in to comment.