From 399bdb6d341d506c6379619e489239a05560c1c6 Mon Sep 17 00:00:00 2001 From: tdstein Date: Tue, 27 Aug 2024 10:08:45 -0400 Subject: [PATCH] chore: sort imports --- examples/connect/dash/app.py | 1 + examples/connect/fastapi/app.py | 1 + examples/connect/flask/app.py | 1 + examples/connect/shiny-python/app.py | 3 ++- examples/connect/streamlit/app.py | 1 + integration/tests/posit/connect/__init__.py | 1 + integration/tests/posit/connect/test_content.py | 1 + tests/posit/connect/external/test_databricks.py | 1 + tests/posit/connect/metrics/test_shiny_usage.py | 3 ++- tests/posit/connect/metrics/test_usage.py | 3 ++- tests/posit/connect/metrics/test_visits.py | 3 ++- tests/posit/connect/test_bundles.py | 3 ++- tests/posit/connect/test_client.py | 1 + tests/posit/connect/test_config.py | 1 + tests/posit/connect/test_content.py | 3 ++- tests/posit/connect/test_env.py | 3 ++- tests/posit/connect/test_errors.py | 1 + tests/posit/connect/test_hooks.py | 3 ++- tests/posit/connect/test_oauth.py | 1 + tests/posit/connect/test_permissions.py | 3 ++- tests/posit/connect/test_tasks.py | 3 ++- tests/posit/connect/test_urls.py | 1 + tests/posit/connect/test_users.py | 3 ++- 23 files changed, 34 insertions(+), 11 deletions(-) diff --git a/examples/connect/dash/app.py b/examples/connect/dash/app.py index f445571e..4ce5d4dc 100644 --- a/examples/connect/dash/app.py +++ b/examples/connect/dash/app.py @@ -8,6 +8,7 @@ from databricks import sql from databricks.sdk.core import ApiClient, Config, databricks_cli from databricks.sdk.service.iam import CurrentUserAPI + from posit.connect.external.databricks import PositCredentialsStrategy DATABRICKS_HOST = os.getenv("DATABRICKS_HOST") diff --git a/examples/connect/fastapi/app.py b/examples/connect/fastapi/app.py index 9247d5ba..f6e05ebf 100644 --- a/examples/connect/fastapi/app.py +++ b/examples/connect/fastapi/app.py @@ -7,6 +7,7 @@ from databricks.sdk.core import Config, databricks_cli from fastapi import FastAPI, Header from fastapi.responses import JSONResponse + from posit.connect.external.databricks import PositCredentialsStrategy DATABRICKS_HOST = os.getenv("DATABRICKS_HOST") diff --git a/examples/connect/flask/app.py b/examples/connect/flask/app.py index 9290bf4b..d74e97f5 100644 --- a/examples/connect/flask/app.py +++ b/examples/connect/flask/app.py @@ -5,6 +5,7 @@ from databricks import sql from databricks.sdk.core import Config, databricks_cli from flask import Flask, request + from posit.connect.external.databricks import PositCredentialsStrategy DATABRICKS_HOST = os.getenv("DATABRICKS_HOST") diff --git a/examples/connect/shiny-python/app.py b/examples/connect/shiny-python/app.py index d0453787..ca07a4e4 100644 --- a/examples/connect/shiny-python/app.py +++ b/examples/connect/shiny-python/app.py @@ -6,9 +6,10 @@ from databricks import sql from databricks.sdk.core import ApiClient, Config, databricks_cli from databricks.sdk.service.iam import CurrentUserAPI -from posit.connect.external.databricks import PositCredentialsStrategy from shiny import App, Inputs, Outputs, Session, render, ui +from posit.connect.external.databricks import PositCredentialsStrategy + DATABRICKS_HOST = os.getenv("DATABRICKS_HOST") DATABRICKS_HOST_URL = f"https://{DATABRICKS_HOST}" SQL_HTTP_PATH = os.getenv("DATABRICKS_PATH") diff --git a/examples/connect/streamlit/app.py b/examples/connect/streamlit/app.py index 4af08f84..fb4a8ae1 100644 --- a/examples/connect/streamlit/app.py +++ b/examples/connect/streamlit/app.py @@ -7,6 +7,7 @@ from databricks import sql from databricks.sdk.core import ApiClient, Config, databricks_cli from databricks.sdk.service.iam import CurrentUserAPI + from posit.connect.external.databricks import PositCredentialsStrategy DATABRICKS_HOST = os.getenv("DATABRICKS_HOST") diff --git a/integration/tests/posit/connect/__init__.py b/integration/tests/posit/connect/__init__.py index 53b720f2..7d8dd0b3 100644 --- a/integration/tests/posit/connect/__init__.py +++ b/integration/tests/posit/connect/__init__.py @@ -1,4 +1,5 @@ from packaging import version + from posit import connect client = connect.Client() diff --git a/integration/tests/posit/connect/test_content.py b/integration/tests/posit/connect/test_content.py index 575e5d00..0e520c1d 100644 --- a/integration/tests/posit/connect/test_content.py +++ b/integration/tests/posit/connect/test_content.py @@ -2,6 +2,7 @@ import pytest from packaging import version + from posit import connect from . import CONNECT_VERSION diff --git a/tests/posit/connect/external/test_databricks.py b/tests/posit/connect/external/test_databricks.py index 19d08dfe..e8439b42 100644 --- a/tests/posit/connect/external/test_databricks.py +++ b/tests/posit/connect/external/test_databricks.py @@ -2,6 +2,7 @@ from unittest.mock import patch import responses + from posit.connect import Client from posit.connect.external.databricks import ( CredentialsProvider, diff --git a/tests/posit/connect/metrics/test_shiny_usage.py b/tests/posit/connect/metrics/test_shiny_usage.py index 29fad126..9afcb4e1 100644 --- a/tests/posit/connect/metrics/test_shiny_usage.py +++ b/tests/posit/connect/metrics/test_shiny_usage.py @@ -2,9 +2,10 @@ import requests import responses +from responses import matchers + from posit.connect.metrics import shiny_usage from posit.connect.resources import ResourceParameters -from responses import matchers from ..api import load_mock # type: ignore diff --git a/tests/posit/connect/metrics/test_usage.py b/tests/posit/connect/metrics/test_usage.py index a1257a5e..29cb3ecb 100644 --- a/tests/posit/connect/metrics/test_usage.py +++ b/tests/posit/connect/metrics/test_usage.py @@ -2,9 +2,10 @@ import pytest import responses +from responses import matchers + from posit import connect from posit.connect.metrics import shiny_usage, usage, visits -from responses import matchers from ..api import load_mock # type: ignore diff --git a/tests/posit/connect/metrics/test_visits.py b/tests/posit/connect/metrics/test_visits.py index cce28f7d..26df29d0 100644 --- a/tests/posit/connect/metrics/test_visits.py +++ b/tests/posit/connect/metrics/test_visits.py @@ -2,9 +2,10 @@ import requests import responses +from responses import matchers + from posit.connect.metrics import visits from posit.connect.resources import ResourceParameters -from responses import matchers from ..api import load_mock # type: ignore diff --git a/tests/posit/connect/test_bundles.py b/tests/posit/connect/test_bundles.py index 16adaa40..dcd2b681 100644 --- a/tests/posit/connect/test_bundles.py +++ b/tests/posit/connect/test_bundles.py @@ -3,9 +3,10 @@ import pytest import responses +from responses import matchers + from posit.connect import Client from posit.connect.bundles import Bundle -from responses import matchers from .api import get_path, load_mock # type: ignore diff --git a/tests/posit/connect/test_client.py b/tests/posit/connect/test_client.py index efe716e3..11942995 100644 --- a/tests/posit/connect/test_client.py +++ b/tests/posit/connect/test_client.py @@ -2,6 +2,7 @@ import pytest import responses + from posit.connect import Client from .api import load_mock # type: ignore diff --git a/tests/posit/connect/test_config.py b/tests/posit/connect/test_config.py index a8f24195..3f1dacf4 100644 --- a/tests/posit/connect/test_config.py +++ b/tests/posit/connect/test_config.py @@ -1,6 +1,7 @@ from unittest.mock import patch import pytest + from posit.connect.config import Config, _get_api_key, _get_url diff --git a/tests/posit/connect/test_content.py b/tests/posit/connect/test_content.py index b846ad98..609fa92f 100644 --- a/tests/posit/connect/test_content.py +++ b/tests/posit/connect/test_content.py @@ -2,10 +2,11 @@ import pytest import responses +from responses import matchers + from posit.connect.client import Client from posit.connect.content import ContentItem, ContentItemOwner from posit.connect.permissions import Permissions -from responses import matchers from .api import load_mock # type: ignore diff --git a/tests/posit/connect/test_env.py b/tests/posit/connect/test_env.py index 418e5127..c4c76dcd 100644 --- a/tests/posit/connect/test_env.py +++ b/tests/posit/connect/test_env.py @@ -1,8 +1,9 @@ import pytest import responses -from posit.connect import Client from responses import matchers +from posit.connect import Client + from .api import load_mock # type: ignore diff --git a/tests/posit/connect/test_errors.py b/tests/posit/connect/test_errors.py index 9443f035..429e4dd9 100644 --- a/tests/posit/connect/test_errors.py +++ b/tests/posit/connect/test_errors.py @@ -1,4 +1,5 @@ import pytest + from posit.connect.errors import ClientError diff --git a/tests/posit/connect/test_hooks.py b/tests/posit/connect/test_hooks.py index a3c32176..6945bc7a 100644 --- a/tests/posit/connect/test_hooks.py +++ b/tests/posit/connect/test_hooks.py @@ -3,10 +3,11 @@ import pytest import responses +from requests import HTTPError, Response + from posit.connect import Client from posit.connect.errors import ClientError from posit.connect.hooks import handle_errors -from requests import HTTPError, Response def test_success(): diff --git a/tests/posit/connect/test_oauth.py b/tests/posit/connect/test_oauth.py index f4b6a4e8..28f77b58 100644 --- a/tests/posit/connect/test_oauth.py +++ b/tests/posit/connect/test_oauth.py @@ -1,4 +1,5 @@ import responses + from posit.connect import Client diff --git a/tests/posit/connect/test_permissions.py b/tests/posit/connect/test_permissions.py index 2f37879a..864169ec 100644 --- a/tests/posit/connect/test_permissions.py +++ b/tests/posit/connect/test_permissions.py @@ -3,10 +3,11 @@ import requests import responses +from responses import matchers + from posit.connect.permissions import Permission, Permissions from posit.connect.resources import ResourceParameters from posit.connect.urls import Url -from responses import matchers from .api import load_mock # type: ignore diff --git a/tests/posit/connect/test_tasks.py b/tests/posit/connect/test_tasks.py index bd09a34d..28cdd718 100644 --- a/tests/posit/connect/test_tasks.py +++ b/tests/posit/connect/test_tasks.py @@ -1,9 +1,10 @@ from unittest import mock import responses +from responses import matchers + from posit import connect from posit.connect import tasks -from responses import matchers from .api import load_mock # type: ignore diff --git a/tests/posit/connect/test_urls.py b/tests/posit/connect/test_urls.py index 0877dcb1..0ce45775 100644 --- a/tests/posit/connect/test_urls.py +++ b/tests/posit/connect/test_urls.py @@ -1,4 +1,5 @@ import pytest + from posit.connect import urls diff --git a/tests/posit/connect/test_users.py b/tests/posit/connect/test_users.py index 884ed07e..568a5f20 100644 --- a/tests/posit/connect/test_users.py +++ b/tests/posit/connect/test_users.py @@ -4,9 +4,10 @@ import pytest import requests import responses +from responses import matchers + from posit.connect.client import Client from posit.connect.users import User -from responses import matchers from .api import load_mock # type: ignore