Skip to content

Commit a2671d7

Browse files
committed
fix typing/docstring issues
1 parent e3ede1c commit a2671d7

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

src/idom/backend/flask.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import idom
2828
from idom.backend._common import (
2929
ASSETS_PATH,
30-
CLIENT_BUILD_DIR,
3130
MODULES_PATH,
3231
PATH_PREFIX,
3332
STREAM_PATH,
@@ -139,7 +138,7 @@ def use_connection() -> Connection[_FlaskCarrier]:
139138

140139
@dataclass
141140
class Options(CommonOptions):
142-
"""Render server config for :class:`FlaskRenderServer`"""
141+
"""Render server config for :func:`idom.backend.flask.configure`"""
143142

144143
cors: bool | dict[str, Any] = False
145144
"""Enable or configure Cross Origin Resource Sharing (CORS)

src/idom/backend/sanic.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import logging
66
from dataclasses import dataclass
7-
from typing import Any, Dict, MutableMapping, Tuple, Union
7+
from typing import Any, MutableMapping, Tuple
88
from urllib import parse as urllib_parse
99
from uuid import uuid4
1010

@@ -23,11 +23,9 @@
2323
serve_json_patch,
2424
)
2525
from idom.core.types import RootComponentConstructor
26-
from idom.utils import vdom_to_html
2726

2827
from ._common import (
2928
ASSETS_PATH,
30-
CLIENT_BUILD_DIR,
3129
MODULES_PATH,
3230
PATH_PREFIX,
3331
STREAM_PATH,
@@ -97,7 +95,7 @@ def use_connection() -> Connection[_SanicCarrier]:
9795

9896
@dataclass
9997
class Options(CommonOptions):
100-
"""Options for :class:`SanicRenderServer`"""
98+
"""Render server config for :func:`idom.backend.sanic.configure`"""
10199

102100
cors: bool | dict[str, Any] = False
103101
"""Enable or configure Cross Origin Resource Sharing (CORS)

src/idom/backend/starlette.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def use_connection() -> Connection[WebSocket]:
9393

9494
@dataclass
9595
class Options(CommonOptions):
96-
"""Optionsuration options for :class:`StarletteRenderServer`"""
96+
"""Render server config for :func:`idom.backend.starlette.configure`"""
9797

9898
cors: bool | dict[str, Any] = False
9999
"""Enable or configure Cross Origin Resource Sharing (CORS)

src/idom/backend/tornado.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import json
55
from asyncio import Queue as AsyncQueue
66
from asyncio.futures import Future
7-
from dataclasses import dataclass
87
from typing import Any, List, Tuple, Type, Union
98
from urllib.parse import urljoin
109

@@ -35,6 +34,7 @@
3534

3635

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

3939

4040
def configure(

src/idom/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def vdom_to_html(value: str | VdomDict, indent: int = 0, depth: int = 0) -> str:
8787

8888
if "attributes" in value:
8989
if not tag: # pragma: no cover
90-
warn(f"Ignored attributes from element frament", UserWarning)
90+
warn("Ignored attributes from element frament", UserWarning)
9191
else:
9292
vdom_attributes = dict(value["attributes"])
9393
if "style" in vdom_attributes:

0 commit comments

Comments
 (0)