Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sort imports #260

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/connect/dash/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions examples/connect/fastapi/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions examples/connect/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion examples/connect/shiny-python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions examples/connect/streamlit/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions integration/tests/posit/connect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from packaging import version

from posit import connect

client = connect.Client()
Expand Down
1 change: 1 addition & 0 deletions integration/tests/posit/connect/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
from packaging import version

from posit import connect

from . import CONNECT_VERSION
Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/external/test_databricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from unittest.mock import patch

import responses

from posit.connect import Client
from posit.connect.external.databricks import (
CredentialsProvider,
Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/metrics/test_shiny_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/metrics/test_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/metrics/test_visits.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pytest
import responses

from posit.connect import Client

from .api import load_mock # type: ignore
Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/test_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import patch

import pytest

from posit.connect.config import Config, _get_api_key, _get_url


Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_env.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from posit.connect.errors import ClientError


Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/test_oauth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import responses

from posit.connect import Client


Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_tasks.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions tests/posit/connect/test_urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from posit.connect import urls


Expand Down
3 changes: 2 additions & 1 deletion tests/posit/connect/test_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading