Skip to content

Commit

Permalink
fix typing/docstring issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorshea committed Nov 19, 2022
1 parent e3ede1c commit a2671d7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/idom/backend/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import idom
from idom.backend._common import (
ASSETS_PATH,
CLIENT_BUILD_DIR,
MODULES_PATH,
PATH_PREFIX,
STREAM_PATH,
Expand Down Expand Up @@ -139,7 +138,7 @@ def use_connection() -> Connection[_FlaskCarrier]:

@dataclass
class Options(CommonOptions):
"""Render server config for :class:`FlaskRenderServer`"""
"""Render server config for :func:`idom.backend.flask.configure`"""

cors: bool | dict[str, Any] = False
"""Enable or configure Cross Origin Resource Sharing (CORS)
Expand Down
6 changes: 2 additions & 4 deletions src/idom/backend/sanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json
import logging
from dataclasses import dataclass
from typing import Any, Dict, MutableMapping, Tuple, Union
from typing import Any, MutableMapping, Tuple
from urllib import parse as urllib_parse
from uuid import uuid4

Expand All @@ -23,11 +23,9 @@
serve_json_patch,
)
from idom.core.types import RootComponentConstructor
from idom.utils import vdom_to_html

from ._common import (
ASSETS_PATH,
CLIENT_BUILD_DIR,
MODULES_PATH,
PATH_PREFIX,
STREAM_PATH,
Expand Down Expand Up @@ -97,7 +95,7 @@ def use_connection() -> Connection[_SanicCarrier]:

@dataclass
class Options(CommonOptions):
"""Options for :class:`SanicRenderServer`"""
"""Render server config for :func:`idom.backend.sanic.configure`"""

cors: bool | dict[str, Any] = False
"""Enable or configure Cross Origin Resource Sharing (CORS)
Expand Down
2 changes: 1 addition & 1 deletion src/idom/backend/starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def use_connection() -> Connection[WebSocket]:

@dataclass
class Options(CommonOptions):
"""Optionsuration options for :class:`StarletteRenderServer`"""
"""Render server config for :func:`idom.backend.starlette.configure`"""

cors: bool | dict[str, Any] = False
"""Enable or configure Cross Origin Resource Sharing (CORS)
Expand Down
2 changes: 1 addition & 1 deletion src/idom/backend/tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import json
from asyncio import Queue as AsyncQueue
from asyncio.futures import Future
from dataclasses import dataclass
from typing import Any, List, Tuple, Type, Union
from urllib.parse import urljoin

Expand Down Expand Up @@ -35,6 +34,7 @@


Options = CommonOptions
"""Render server config for :func:`idom.backend.tornado.configure`"""


def configure(
Expand Down
2 changes: 1 addition & 1 deletion src/idom/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def vdom_to_html(value: str | VdomDict, indent: int = 0, depth: int = 0) -> str:

if "attributes" in value:
if not tag: # pragma: no cover
warn(f"Ignored attributes from element frament", UserWarning)
warn("Ignored attributes from element frament", UserWarning)
else:
vdom_attributes = dict(value["attributes"])
if "style" in vdom_attributes:
Expand Down

0 comments on commit a2671d7

Please sign in to comment.