Skip to content

Commit c8443cd

Browse files
committed
sort imports
1 parent 286540b commit c8443cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+162
-199
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ repos:
1212
hooks:
1313
- id: nbstripout
1414
files: ".ipynb"
15+
- repo: https://github.com/pycqa/isort
16+
rev: 5.6.3
17+
hooks:
18+
- id: isort
19+
name: isort

docs/main.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import os
22
import sys
33
from pathlib import Path
4-
from pathlib import Path
54

6-
from sanic import Sanic
7-
from sanic import response
5+
from sanic import Sanic, response
86

97
import idom
10-
from idom.widgets.utils import multiview
118
from idom.client.manage import APP_DIR
129
from idom.server.sanic import PerClientStateServer
10+
from idom.widgets.utils import multiview
1311

1412
here = Path(__file__).parent
1513

docs/source/_exts/async_doctest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
from doctest import DocTest, DocTestRunner
12
from textwrap import indent
23
from typing import Any
34

45
from sphinx.application import Sphinx
5-
from sphinx.ext.doctest import DocTestBuilder, setup as doctest_setup
6-
from doctest import DocTest, DocTestRunner
7-
6+
from sphinx.ext.doctest import DocTestBuilder
7+
from sphinx.ext.doctest import setup as doctest_setup
88

99
test_template = """
1010
import asyncio as __asyncio

docs/source/_exts/interactive_widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from sphinx.application import Sphinx
2-
from docutils.parsers.rst import Directive
31
from docutils.nodes import raw
2+
from docutils.parsers.rst import Directive
3+
from sphinx.application import Sphinx
44

55

66
class IteractiveWidget(Directive):

docs/source/_exts/widget_example.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from pathlib import Path
22

3-
from sphinx.application import Sphinx
4-
from sphinx.util.docutils import SphinxDirective
53
from docutils.parsers.rst import directives
64
from docutils.statemachine import StringList
7-
5+
from sphinx.application import Sphinx
6+
from sphinx.util.docutils import SphinxDirective
87
from sphinx_panels.tabs import TabbedDirective
98

109
here = Path(__file__).parent

docs/source/examples/material_ui_button_on_click.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import idom
44

5-
65
material_ui = idom.install("@material-ui/core", fallback="loading...")
76

87

docs/source/examples/material_ui_slider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import idom
44

5-
65
material_ui = idom.install("@material-ui/core", fallback="loading...")
76

87

docs/source/examples/simple_dashboard.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import idom
66
from idom.widgets.html import Input
77

8-
98
victory = idom.install("victory", fallback="loading...")
109

1110

docs/source/examples/super_simple_chart.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import idom
44

5-
65
path_to_source_file = Path(__file__).parent / "super_simple_chart.js"
76
ssc = idom.Module("super-simple-chart", source_file=path_to_source_file)
87

idom/__init__.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
1-
from pkg_resources import (
2-
get_distribution as _get_distribution,
3-
DistributionNotFound as _DistributionNotFound,
4-
)
1+
from pkg_resources import DistributionNotFound as _DistributionNotFound
2+
from pkg_resources import get_distribution as _get_distribution
53

64
try:
75
__version__: str = _get_distribution(__name__).version
86
except _DistributionNotFound: # pragma: no cover
97
# package is not installed
108
__version__ = "0.0.0"
119

12-
from .utils import Ref, html_to_vdom
13-
14-
from .core.component import component, Component
15-
from .core.events import event, Events
16-
from .core.layout import Layout
17-
from .core.vdom import vdom, VdomDict
10+
from .client.module import Import, Module, install
1811
from .core import hooks
19-
12+
from .core.component import Component, component
13+
from .core.events import Events, event
14+
from .core.layout import Layout
15+
from .core.vdom import VdomDict, vdom
16+
from .server.prefab import run
17+
from .utils import Ref, html_to_vdom
2018
from .widgets.html import html
2119
from .widgets.utils import hotswap, multiview
2220

23-
from .client.module import Module, Import, install
24-
25-
from .server.prefab import run
26-
27-
from . import widgets
28-
2921
# try to automatically setup the dialect's import hook
3022
try:
23+
import htm
3124
import pyalect
3225
import tagged
33-
import htm
3426
except ImportError: # pragma: no cover
3527
pass
3628
else:

0 commit comments

Comments
 (0)