File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11from pathlib import Path
2- from typing import Union
2+ from typing import Union , cast
33
44from typing_extensions import Protocol
55
1111class ClientImplementation (Protocol ):
1212 """A minimal set of functions required to use :class:`idom.widget.module.Module`"""
1313
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``"""
1616
1717 def web_module_url (self , name : str ) -> str :
1818 """Return the URL to import the module with the given name."""
@@ -21,5 +21,7 @@ def web_module_exists(self, name: str) -> bool:
2121 """Check if a module with the given name is installed"""
2222
2323
24- client_implementation : Ref [ClientImplementation ] = Ref (manage )
24+ client_implementation : Ref [ClientImplementation ] = Ref (
25+ cast (ClientImplementation , manage )
26+ )
2527"""The current client implementation used by :class:`idom.widgets.module.Module`"""
You can’t perform that action at this time.
0 commit comments