Skip to content

Commit

Permalink
revert sort imports
Browse files Browse the repository at this point in the history
This reverts commit cf0a304
  • Loading branch information
bmos committed Sep 17, 2024
1 parent 0fc1d2b commit 5339c03
Show file tree
Hide file tree
Showing 196 changed files with 504 additions and 676 deletions.
5 changes: 2 additions & 3 deletions parsons/actblue/actblue.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
import time

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

logger = logging.getLogger(__name__)

Expand Down
3 changes: 1 addition & 2 deletions parsons/action_builder/action_builder.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
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: 2 additions & 3 deletions parsons/action_kit/action_kit.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import json
import logging
import math
import time

import requests
import time
import math

from parsons.etl.table import Table
from parsons.utilities import check_env
Expand Down
1 change: 0 additions & 1 deletion parsons/action_network/action_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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: 2 additions & 3 deletions parsons/airtable/airtable.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
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: 0 additions & 2 deletions parsons/alchemer/alchemer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import logging

import surveygizmo

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

Expand Down
1 change: 0 additions & 1 deletion parsons/auth0/auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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.aws_async import event_command
from parsons.aws.lambda_distribute import distribute_task
from parsons.aws.s3 import S3
from parsons.aws.lambda_distribute import distribute_task
from parsons.aws.aws_async import event_command

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

import boto3


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

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.aws_async import (
get_func_task_path,
import_and_get_task,
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: 2 additions & 3 deletions parsons/aws/s3.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
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: 1 addition & 0 deletions parsons/azure/azure_blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

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: 1 addition & 3 deletions parsons/bill_com/bill_com.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import json

import requests

import json
from parsons import Table


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

import requests
import logging

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: 2 additions & 1 deletion parsons/box/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
"""

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: 1 addition & 0 deletions parsons/braintree/braintree.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

import braintree

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

Expand Down
4 changes: 1 addition & 3 deletions parsons/capitol_canary/capitol_canary.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
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 Dict, List, Optional, Union
from typing import Optional, Union, Dict, List
from zipfile import ZipFile

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

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

logger = logging.getLogger(__name__)

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

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

logger = logging.getLogger(__name__)

Expand Down
8 changes: 3 additions & 5 deletions parsons/copper/copper.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import json
import logging
from requests import request
import math
import json
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: 2 additions & 4 deletions parsons/crowdtangle/crowdtangle.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging
import time

from requests import request

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

logger = logging.getLogger(__name__)

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

from sqlalchemy import MetaData, Table, create_engine

logger = logging.getLogger(__name__)


Expand Down
3 changes: 1 addition & 2 deletions parsons/databases/database/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging

import parsons.databases.database.constants as consts
import logging

logger = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion parsons/databases/database_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
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 List, Optional, Type, Union
from typing import Optional, Union, Type, List

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: 3 additions & 4 deletions parsons/databases/mysql/create_table.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
from parsons.databases.database.database import DatabaseCreateStatement
import parsons.databases.mysql.constants as consts

import petl

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

logger = logging.getLogger(__name__)

Expand Down
19 changes: 9 additions & 10 deletions parsons/databases/mysql/mysql.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
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.mysql.create_table import MySQLCreateTable
from parsons.databases.table import BaseTable
from parsons.utilities import check_env, files
from parsons.databases.mysql.create_table import MySQLCreateTable
from parsons.databases.alchemy import Alchemy

# 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 @@
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.databases.alchemy import Alchemy
from parsons.databases.database_connector import DatabaseConnector
from parsons.etl.table import Table
import logging
import os


logger = logging.getLogger(__name__)

Expand Down
10 changes: 4 additions & 6 deletions parsons/databases/postgres/postgres_core.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
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: 3 additions & 4 deletions parsons/databases/postgres/postgres_create_statement.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
from parsons.databases.database.database import DatabaseCreateStatement
import parsons.databases.postgres.constants as consts

import petl

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

logger = logging.getLogger(__name__)

Expand Down
Loading

0 comments on commit 5339c03

Please sign in to comment.