diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41f6e67c..628086fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,10 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - id: check-case-conflict +- repo: https://github.com/asottile/reorder_python_imports + rev: v3.9.0 + hooks: + - id: reorder-python-imports - repo: https://github.com/psf/black rev: 22.3.0 hooks: diff --git a/dbt/adapters/duckdb/connections.py b/dbt/adapters/duckdb/connections.py index 246d1287..65b8ce0f 100644 --- a/dbt/adapters/duckdb/connections.py +++ b/dbt/adapters/duckdb/connections.py @@ -1,21 +1,22 @@ import atexit import threading from contextlib import contextmanager -from typing import Any, Dict, Optional, Tuple +from dataclasses import dataclass +from typing import Any +from typing import Dict +from typing import Optional +from typing import Tuple import duckdb import dbt.exceptions from dbt.adapters.base import Credentials from dbt.adapters.sql import SQLConnectionManager -from dbt.contracts.connection import ( - AdapterRequiredConfig, - AdapterResponse, - Connection, - ConnectionState, -) +from dbt.contracts.connection import AdapterRequiredConfig +from dbt.contracts.connection import AdapterResponse +from dbt.contracts.connection import Connection +from dbt.contracts.connection import ConnectionState from dbt.logger import GLOBAL_LOGGER as logger -from dataclasses import dataclass @dataclass diff --git a/dbt/adapters/duckdb/impl.py b/dbt/adapters/duckdb/impl.py index ee78f9f4..f23043f0 100644 --- a/dbt/adapters/duckdb/impl.py +++ b/dbt/adapters/duckdb/impl.py @@ -1,7 +1,8 @@ from dbt.adapters.duckdb.connections import DuckDBConnectionManager from dbt.adapters.sql import SQLAdapter from dbt.contracts.connection import AdapterResponse -from dbt.exceptions import InternalException, RuntimeException +from dbt.exceptions import InternalException +from dbt.exceptions import RuntimeException class DuckDBAdapter(SQLAdapter): diff --git a/setup.py b/setup.py index e5f430df..660da16a 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,8 @@ import os import re -from setuptools import find_namespace_packages, setup +from setuptools import find_namespace_packages +from setuptools import setup this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_directory, "README.md")) as f: