Skip to content

Commit dae287f

Browse files
committed
two lines after imports
1 parent 60ae5e0 commit dae287f

Some content is hidden

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

45 files changed

+46
-0
lines changed

docs/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from idom.server.sanic import PerClientStateServer
99
from idom.widgets.utils import multiview
1010

11+
1112
here = Path(__file__).parent
1213

1314
app = Sanic(__name__)

docs/source/_exts/async_doctest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from sphinx.ext.doctest import DocTestBuilder
77
from sphinx.ext.doctest import setup as doctest_setup
88

9+
910
test_template = """
1011
import asyncio as __asyncio
1112

docs/source/_exts/interactive_widget.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from docutils.parsers.rst import Directive
55
from sphinx.application import Sphinx
66

7+
78
_IDOM_SERVER_LOC = os.environ.get("IDOM_DOC_EXAMPLE_SERVER_HOST", "")
89

910

docs/source/_exts/widget_example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from sphinx.util.docutils import SphinxDirective
77
from sphinx_panels.tabs import TabbedDirective
88

9+
910
here = Path(__file__).parent
1011
examples = here.parent / "examples"
1112

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import sys
1010
from pathlib import Path
1111

12+
1213
# -- Path Setup --------------------------------------------------------------
1314

1415
here = Path(__file__).parent

docs/source/examples/material_ui_button_no_action.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import idom
22

3+
34
material_ui = idom.install("@material-ui/core", fallback="loading...")
45

56
idom.run(

docs/source/examples/material_ui_button_on_click.py

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

33
import idom
44

5+
56
material_ui = idom.install("@material-ui/core", fallback="loading...")
67

78

docs/source/examples/material_ui_slider.py

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

33
import idom
44

5+
56
material_ui = idom.install("@material-ui/core", fallback="loading...")
67

78

docs/source/examples/simple_dashboard.py

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

8+
89
victory = idom.install("victory", fallback="loading...")
910

1011

docs/source/examples/super_simple_chart.py

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

33
import idom
44

5+
56
path_to_source_file = Path(__file__).parent / "super_simple_chart.js"
67
ssc = idom.Module("super-simple-chart", source_file=path_to_source_file)
78

docs/source/examples/victory_chart.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import idom
22

3+
34
victory = idom.install("victory", fallback="loading...")
45

56
idom.run(

noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import nox
55
from nox.sessions import Session
66

7+
78
posargs_pattern = re.compile(r"^(\w+)\[(.+)\]$")
89

910

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ use_parentheses = "True"
99
ensure_newline_before_comments = "True"
1010
include_trailing_comma = "True"
1111
line_length = 88
12+
lines_after_imports = 2

scripts/live_docs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from idom.server.sanic import PerClientStateServer
1414

15+
1516
os.environ["IDOM_DOC_EXAMPLE_SERVER_HOST"] = "127.0.0.1:5555"
1617
_running_idom_servers = []
1718

scripts/one_example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import idom
55

6+
67
here = Path(__file__).parent
78
examples_dir = here.parent / "docs" / "source" / "examples"
89
sys.path.insert(0, str(examples_dir))

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from setuptools import find_packages, setup
1414
from setuptools.command.develop import develop
1515

16+
1617
if sys.platform == "win32":
1718
from subprocess import list2cmdline
1819
else:

src/idom/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from pkg_resources import DistributionNotFound as _DistributionNotFound
22
from pkg_resources import get_distribution as _get_distribution
33

4+
45
try:
56
__version__: str = _get_distribution(__name__).version
67
except _DistributionNotFound: # pragma: no cover
@@ -19,6 +20,7 @@
1920
from .widgets.html import html
2021
from .widgets.utils import hotswap, multiview
2122

23+
2224
# try to automatically setup the dialect's import hook
2325
try:
2426
import htm

src/idom/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .cli import main
22

3+
34
if __name__ == "__main__":
45
main()

src/idom/_option.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
from typing import Any, Callable, Generic, TypeVar, cast
55

6+
67
_O = TypeVar("_O")
78

89

src/idom/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import idom
66
from idom.client import manage as manage_client
77

8+
89
main = typer.Typer()
910
show = typer.Typer()
1011
main.add_typer(show, name="show", short_help="Display information about IDOM")

src/idom/client/_private.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from idom.config import IDOM_CLIENT_BUILD_DIR
77

8+
89
HERE = Path(__file__).parent
910

1011

src/idom/client/manage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from . import _private
1212

13+
1314
logger = getLogger(__name__)
1415

1516

src/idom/config.py

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

33
from . import _option
44

5+
56
IDOM_DEBUG_MODE = _option.Option(
67
"IDOM_DEBUG_MODE",
78
default=False,

src/idom/core/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .layout import Layout
55
from .vdom import vdom
66

7+
78
__all__ = [
89
"AbstractComponent",
910
"Layout",

src/idom/core/component.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from functools import wraps
44
from typing import TYPE_CHECKING, Any, Callable, Dict, Tuple, Union
55

6+
67
if TYPE_CHECKING: # pragma: no cover
78
from .vdom import VdomDict # noqa
89

src/idom/core/dispatcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .layout import Layout, LayoutEvent, LayoutUpdate
1010
from .utils import HasAsyncResources, async_resource
1111

12+
1213
logger = getLogger(__name__)
1314

1415
SendCoroutine = Callable[[Any], Awaitable[None]]

src/idom/core/events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from anyio import create_task_group
1515
from mypy_extensions import TypedDict
1616

17+
1718
EventsMapping = Union[Dict[str, Union["Callable[..., Any]", "EventHandler"]], "Events"]
1819

1920

src/idom/core/hooks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from .component import AbstractComponent
2626

27+
2728
__all__ = [
2829
"use_state",
2930
"use_effect",

src/idom/core/layout.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from .utils import CannotAccessResource, HasAsyncResources, async_resource
2727
from .vdom import validate_serialized_vdom
2828

29+
2930
logger = getLogger(__name__)
3031

3132

src/idom/core/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
overload,
1515
)
1616

17+
1718
if sys.version_info >= (3, 7): # pragma: no cover
1819
from contextlib import AsyncExitStack, asynccontextmanager # noqa
1920
else: # pragma: no cover

src/idom/core/vdom.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .component import AbstractComponent
88
from .events import EventsMapping
99

10+
1011
SERIALIZED_VDOM_JSON_SCHEMA = {
1112
"$schema": "http://json-schema.org/draft-07/schema",
1213
"$ref": "#/definitions/element",

src/idom/log.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .config import IDOM_DEBUG_MODE
66

7+
78
root_logger = logging.getLogger("idom")
89

910

src/idom/server/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .base import AbstractRenderServer
22
from .prefab import hotswap_server, multiview_server, run
33

4+
45
__all__ = [
56
"default",
67
"run",

src/idom/server/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from idom.core.component import ComponentConstructor
66

7+
78
_App = TypeVar("_App", bound=Any)
89
_Config = TypeVar("_Config", bound=Any)
910
_Self = TypeVar("_Self", bound="AbstractRenderServer[Any, Any]")

src/idom/server/prefab.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .base import AbstractRenderServer
88
from .utils import find_available_port, find_builtin_server_type
99

10+
1011
logger = logging.getLogger(__name__)
1112
_S = TypeVar("_S", bound=AbstractRenderServer[Any, Any])
1213

src/idom/server/tornado.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
from .base import AbstractRenderServer
1919

20+
2021
_RouteHandlerSpecs = List[Tuple[str, Type[RequestHandler], Any]]
2122

2223

src/idom/testing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from idom.server.prefab import hotswap_server
2323
from idom.server.utils import find_available_port, find_builtin_server_type
2424

25+
2526
__all__ = [
2627
"find_available_port",
2728
"create_simple_selenium_web_driver",

src/idom/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from html.parser import HTMLParser as _HTMLParser
22
from typing import Any, Callable, Dict, Generic, List, Optional, Tuple, TypeVar
33

4+
45
_RefValue = TypeVar("_RefValue")
56

67

src/idom/widgets/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .html import Input, html, image
22
from .utils import hotswap, multiview
33

4+
45
__all__ = [
56
"node",
67
"hotswap",

src/idom/widgets/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from idom.core.component import ComponentConstructor, component
55
from idom.utils import Ref
66

7+
78
MountFunc = Callable[[ComponentConstructor], None]
89

910

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from idom.cli import main
55
from idom.client.manage import web_module_exists
66

7+
78
cli_runner = CliRunner()
89

910

tests/test_client/test_module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from idom import Module
77
from tests.general_utils import patch_slots_object
88

9+
910
HERE = Path(__file__).parent
1011

1112

tests/test_core/test_vdom.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import idom
55
from idom.core.vdom import component, make_vdom_constructor, validate_serialized_vdom
66

7+
78
fake_events = idom.Events()
89

910

tests/test_widgets/test_html.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import idom
77
from tests.driver_utils import send_keys
88

9+
910
_image_src_bytes = b"""
1011
<svg width="400" height="110" xmlns="http://www.w3.org/2000/svg">
1112
<rect width="300" height="100" style="fill:rgb(0,0,255);" />

tests/test_widgets/test_utils.py

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

33
import idom
44

5+
56
HERE = Path(__file__).parent
67

78

0 commit comments

Comments
 (0)