Skip to content

Commit e5817bc

Browse files
committed
typing to named tuple
1 parent d32033e commit e5817bc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

reflex/utils/prerequisites.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
from datetime import datetime
2323
from pathlib import Path
2424
from types import ModuleType
25-
from typing import Callable, List, Optional
26-
from collections import namedtuple
25+
from typing import Callable, List, NamedTuple, Optional
2726

2827
import httpx
2928
import typer
@@ -49,7 +48,14 @@
4948

5049
CURRENTLY_INSTALLING_NODE = False
5150

52-
AppInfo = namedtuple("AppInfo", ["app", "module"])
51+
52+
class AppInfo(NamedTuple):
53+
"""A tuple containing the app instance and module."""
54+
55+
app: App
56+
module: ModuleType
57+
58+
5359
@dataclasses.dataclass(frozen=True)
5460
class Template:
5561
"""A template for a Reflex app."""

0 commit comments

Comments
 (0)