File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
- from typing import Union
2
+ from typing import Union , cast
3
3
4
4
from typing_extensions import Protocol
5
5
11
11
class ClientImplementation (Protocol ):
12
12
"""A minimal set of functions required to use :class:`idom.widget.module.Module`"""
13
13
14
- def register_web_module (self , name : str , source : Union [str , Path ]) -> None :
15
- """Add a module with the given ``name`` to the client using the given ``source``"""
14
+ def register_web_module (self , name : str , source : Union [str , Path ]) -> str :
15
+ """Return the URL of a module added under the given ``name`` and contents of ``source``"""
16
16
17
17
def web_module_url (self , name : str ) -> str :
18
18
"""Return the URL to import the module with the given name."""
@@ -21,5 +21,7 @@ def web_module_exists(self, name: str) -> bool:
21
21
"""Check if a module with the given name is installed"""
22
22
23
23
24
- client_implementation : Ref [ClientImplementation ] = Ref (manage )
24
+ client_implementation : Ref [ClientImplementation ] = Ref (
25
+ cast (ClientImplementation , manage )
26
+ )
25
27
"""The current client implementation used by :class:`idom.widgets.module.Module`"""
You can’t perform that action at this time.
0 commit comments