Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/app/agent_files/_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def generate_dynamic_api_reference_files() -> tuple[tuple[Path, str], ...]:
rx.event.Event,
rx.event.EventHandler,
rx.event.EventSpec,
rx.Model,
# rx.Model excluded: deprecated in 0.9.2, removed in 1.0.
StateManager,
rx.State,
ImportVar,
Expand Down
2 changes: 1 addition & 1 deletion docs/app/reflex_docs/pages/docs/apiref.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
rx.event.Event,
rx.event.EventHandler,
rx.event.EventSpec,
rx.Model,
# rx.Model excluded: deprecated in 0.9.2, removed in 1.0.
# rx.testing.AppHarness,
StateManager,
# rx.state.BaseState,
Expand Down
14 changes: 9 additions & 5 deletions packages/reflex-base/src/reflex_base/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from typing import get_type_hints as get_type_hints_og

from typing_extensions import Self as Self
from typing_extensions import TypeAliasType
from typing_extensions import override as override

from reflex_base import constants
Expand Down Expand Up @@ -143,13 +144,16 @@ def __call__(
| _ArgsSpec7
)

Scope = MutableMapping[str, Any]
Message = MutableMapping[str, Any]
# Defined via TypeAliasType so the alias name survives type introspection
# (e.g. get_type_hints) instead of expanding to its full definition; docs render
# the short name. Reverting to plain assignment would regress that display.
Scope = TypeAliasType("Scope", MutableMapping[str, Any])
Message = TypeAliasType("Message", MutableMapping[str, Any])

Receive = Callable[[], Awaitable[Message]]
Send = Callable[[Message], Awaitable[None]]
Receive = TypeAliasType("Receive", Callable[[], Awaitable[Message]])
Send = TypeAliasType("Send", Callable[[Message], Awaitable[None]])

ASGIApp = Callable[[Scope, Receive, Send], Awaitable[None]]
ASGIApp = TypeAliasType("ASGIApp", Callable[[Scope, Receive, Send], Awaitable[None]])

PrimitiveToAnnotation = {
list: List, # noqa: UP006
Expand Down
2 changes: 2 additions & 0 deletions packages/reflex-docgen/src/reflex_docgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from reflex_docgen._class import ClassDocumentation as ClassDocumentation
from reflex_docgen._class import FieldDocumentation as FieldDocumentation
from reflex_docgen._class import MethodDocumentation as MethodDocumentation
from reflex_docgen._class import format_type as format_type
from reflex_docgen._class import (
generate_class_documentation as generate_class_documentation,
)
Expand All @@ -25,6 +26,7 @@
"FieldDocumentation",
"MethodDocumentation",
"PropDocumentation",
"format_type",
"generate_class_documentation",
"generate_documentation",
"get_component_event_handlers",
Expand Down
Loading
Loading