Skip to content

Commit cb3f422

Browse files
committed
Updating types
1 parent 4d54da5 commit cb3f422

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

shiny/_app.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import copy
44
import os
5+
import secrets
56
import shutil
67
import tempfile
7-
import secrets
88
from contextlib import AsyncExitStack, asynccontextmanager
99
from inspect import signature
1010
from pathlib import Path
@@ -216,11 +216,13 @@ def __init__(
216216
cast("Tag | TagList", ui), lib_prefix=self.lib_prefix
217217
)
218218

219-
def __del__(self):
219+
def __del__(self) -> None:
220220
current_temp_dir = os.path.realpath(tempfile.gettempdir())
221221

222-
user_dependencies = [
223-
v.source["subdir"]
222+
# Ignoring a type hint on source["subdir"] because all of our user-created dependencies
223+
# must have a "subdir" source, but the HTMLDependency type allows for other variations.
224+
user_dependencies: list[str] = [
225+
v.source["subdir"] # type: ignore
224226
for k, v in self._registered_dependencies.items()
225227
if k.startswith("include-")
226228
]

0 commit comments

Comments
 (0)