From 50db68e8aa894a787111c90ab8b139f234e3d8a4 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Mon, 31 Jul 2023 13:57:02 +0200 Subject: [PATCH] ci: isort formatting after running pre-commit --all-files --- .../solara-enterprise/solara_enterprise/auth/components.py | 1 + packages/solara-enterprise/solara_enterprise/auth/flask.py | 1 + .../solara-enterprise/solara_enterprise/auth/starlette.py | 3 ++- packages/solara-enterprise/solara_enterprise/cache/disk.py | 1 + .../solara_enterprise/cache/memory_size.py | 6 +++--- packages/solara-enterprise/solara_enterprise/cache/redis.py | 4 ++-- .../solara-enterprise/solara_enterprise/search/index.py | 5 +++-- .../solara-enterprise/solara_enterprise/search/search.py | 3 ++- packages/solara-enterprise/solara_enterprise/ssg.py | 5 +++-- solara/components/code_highlight_css.py | 1 + solara/layout.py | 1 + solara/template/portal/solara_portal/components/article.py | 1 + solara/template/portal/solara_portal/components/data.py | 1 + solara/template/portal/solara_portal/pages/viz/__init__.py | 1 + solara/website/pages/api/plotly.py | 1 + tests/unit/cross_filter_test.py | 3 ++- tests/unit/datatable_test.py | 3 ++- tests/unit/matplotlib_test.py | 3 ++- 18 files changed, 30 insertions(+), 14 deletions(-) diff --git a/packages/solara-enterprise/solara_enterprise/auth/components.py b/packages/solara-enterprise/solara_enterprise/auth/components.py index e2aaf1b00..99d37e79f 100644 --- a/packages/solara-enterprise/solara_enterprise/auth/components.py +++ b/packages/solara-enterprise/solara_enterprise/auth/components.py @@ -1,6 +1,7 @@ from typing import Optional, Union import reacton.ipyvuetify as v + import solara from .. import auth diff --git a/packages/solara-enterprise/solara_enterprise/auth/flask.py b/packages/solara-enterprise/solara_enterprise/auth/flask.py index 2179107a1..cc209aebf 100644 --- a/packages/solara-enterprise/solara_enterprise/auth/flask.py +++ b/packages/solara-enterprise/solara_enterprise/auth/flask.py @@ -4,6 +4,7 @@ from authlib.integrations.flask_client import OAuth from flask import redirect, request, session + from solara.server import settings logger = logging.getLogger("solara.enterprise.auth.starlette") diff --git a/packages/solara-enterprise/solara_enterprise/auth/starlette.py b/packages/solara-enterprise/solara_enterprise/auth/starlette.py index d9186ff2b..b58497b83 100644 --- a/packages/solara-enterprise/solara_enterprise/auth/starlette.py +++ b/packages/solara-enterprise/solara_enterprise/auth/starlette.py @@ -3,7 +3,6 @@ from typing import Dict, Optional from authlib.integrations.starlette_client import OAuth -from solara.server import settings from starlette.authentication import ( AuthCredentials, AuthenticationBackend, @@ -13,6 +12,8 @@ from starlette.requests import HTTPConnection, Request from starlette.responses import RedirectResponse +from solara.server import settings + logger = logging.getLogger("solara.enterprise.auth.starlette") diff --git a/packages/solara-enterprise/solara_enterprise/cache/disk.py b/packages/solara-enterprise/solara_enterprise/cache/disk.py index 53a409305..3551d3d71 100644 --- a/packages/solara-enterprise/solara_enterprise/cache/disk.py +++ b/packages/solara-enterprise/solara_enterprise/cache/disk.py @@ -3,6 +3,7 @@ from typing import MutableMapping import diskcache + import solara.settings import solara.util diff --git a/packages/solara-enterprise/solara_enterprise/cache/memory_size.py b/packages/solara-enterprise/solara_enterprise/cache/memory_size.py index f2a6b2203..799387132 100644 --- a/packages/solara-enterprise/solara_enterprise/cache/memory_size.py +++ b/packages/solara-enterprise/solara_enterprise/cache/memory_size.py @@ -2,12 +2,12 @@ import pickle from typing import Any, Callable, MutableMapping -import solara.settings -import solara.util from cachetools import LRUCache - from solara_enterprise.cache.base import Base, make_key +import solara.settings +import solara.util + logger = logging.getLogger("solara-enterprise.cache.memory") diff --git a/packages/solara-enterprise/solara_enterprise/cache/redis.py b/packages/solara-enterprise/solara_enterprise/cache/redis.py index 0ee1c7b3e..eadf71cdf 100644 --- a/packages/solara-enterprise/solara_enterprise/cache/redis.py +++ b/packages/solara-enterprise/solara_enterprise/cache/redis.py @@ -1,10 +1,10 @@ from typing import Any, Callable, Optional import redis -import solara.settings - from solara_enterprise.cache.base import Base, make_key +import solara.settings + class Redis(Base): """Wraps a client such that the values are pickled/unpickled""" diff --git a/packages/solara-enterprise/solara_enterprise/search/index.py b/packages/solara-enterprise/solara_enterprise/search/index.py index 090ffa892..dfe0e519a 100644 --- a/packages/solara-enterprise/solara_enterprise/search/index.py +++ b/packages/solara-enterprise/solara_enterprise/search/index.py @@ -2,11 +2,12 @@ from pathlib import Path from typing import Any, List -import solara from rich import print as rprint -from solara.server import settings from typing_extensions import TypedDict +import solara +from solara.server import settings + from .. import license diff --git a/packages/solara-enterprise/solara_enterprise/search/search.py b/packages/solara-enterprise/solara_enterprise/search/search.py index 863d02936..7c6fe5b62 100644 --- a/packages/solara-enterprise/solara_enterprise/search/search.py +++ b/packages/solara-enterprise/solara_enterprise/search/search.py @@ -1,7 +1,8 @@ import ipyvue -import solara import traitlets +import solara + class SearchWidget(ipyvue.VueTemplate): template_file = (__file__, "search.vue") diff --git a/packages/solara-enterprise/solara_enterprise/ssg.py b/packages/solara-enterprise/solara_enterprise/ssg.py index be57ff0f1..2fcf06f51 100644 --- a/packages/solara-enterprise/solara_enterprise/ssg.py +++ b/packages/solara-enterprise/solara_enterprise/ssg.py @@ -6,11 +6,12 @@ from pathlib import Path from typing import List, Optional -import solara from rich import print as rprint -from solara.server import settings from typing_extensions import TypedDict +import solara +from solara.server import settings + from . import license logger = logging.getLogger("solara.server.ssg") diff --git a/solara/components/code_highlight_css.py b/solara/components/code_highlight_css.py index b63796081..ad6b5fc5b 100644 --- a/solara/components/code_highlight_css.py +++ b/solara/components/code_highlight_css.py @@ -1,4 +1,5 @@ import ipyvuetify as vy + import solara diff --git a/solara/layout.py b/solara/layout.py index ef3aeecb7..1e7e4739c 100644 --- a/solara/layout.py +++ b/solara/layout.py @@ -1,4 +1,5 @@ import reacton.ipyvuetify as v + import solara from solara.kitchensink import vue diff --git a/solara/template/portal/solara_portal/components/article.py b/solara/template/portal/solara_portal/components/article.py index b82a6ff9b..6bf32f1a0 100644 --- a/solara/template/portal/solara_portal/components/article.py +++ b/solara/template/portal/solara_portal/components/article.py @@ -1,4 +1,5 @@ import reacton.ipyvuetify as rv + import solara from ..data import articles diff --git a/solara/template/portal/solara_portal/components/data.py b/solara/template/portal/solara_portal/components/data.py index 5a9877ae9..58264bc6a 100644 --- a/solara/template/portal/solara_portal/components/data.py +++ b/solara/template/portal/solara_portal/components/data.py @@ -1,4 +1,5 @@ import reacton.ipyvuetify as rv + import solara from ..data import dfs diff --git a/solara/template/portal/solara_portal/pages/viz/__init__.py b/solara/template/portal/solara_portal/pages/viz/__init__.py index bfe694096..705cef9fe 100644 --- a/solara/template/portal/solara_portal/pages/viz/__init__.py +++ b/solara/template/portal/solara_portal/pages/viz/__init__.py @@ -5,6 +5,7 @@ from typing import Optional import plotly.express as px + import solara from ... import data diff --git a/solara/website/pages/api/plotly.py b/solara/website/pages/api/plotly.py index 7fb06247c..78ab40bc6 100644 --- a/solara/website/pages/api/plotly.py +++ b/solara/website/pages/api/plotly.py @@ -10,6 +10,7 @@ """ import plotly.express as px + import solara df = px.data.iris() diff --git a/tests/unit/cross_filter_test.py b/tests/unit/cross_filter_test.py index 1c37f9f17..6595888b2 100644 --- a/tests/unit/cross_filter_test.py +++ b/tests/unit/cross_filter_test.py @@ -1,8 +1,9 @@ from typing import Optional -import solara import vaex +import solara + df = vaex.from_arrays(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16]) diff --git a/tests/unit/datatable_test.py b/tests/unit/datatable_test.py index a56283d29..5951bb248 100644 --- a/tests/unit/datatable_test.py +++ b/tests/unit/datatable_test.py @@ -1,6 +1,7 @@ import pytest -import solara import vaex + +import solara from solara.components.datatable import DataTable, DataTableWidget df_vaex = vaex.datasets.titanic() diff --git a/tests/unit/matplotlib_test.py b/tests/unit/matplotlib_test.py index 60115d6ac..ab421e6e4 100644 --- a/tests/unit/matplotlib_test.py +++ b/tests/unit/matplotlib_test.py @@ -1,6 +1,7 @@ -import solara from matplotlib.figure import Figure +import solara + @solara.component def Page():