@@ -38,7 +38,7 @@ def install(
3838 ignore_installed : bool = False ,
3939 fallback : Optional [str ] = None ,
4040 # dynamically installed modules probably won't have a mount so we default to False
41- has_mount : bool = False ,
41+ exports_mount : bool = False ,
4242) -> Union [Module , List [Module ]]:
4343 return_one = False
4444 if isinstance (packages , str ):
@@ -51,10 +51,11 @@ def install(
5151 manage .build (packages , clean_build = False )
5252
5353 if return_one :
54- return Module (pkg_names [0 ], fallback = fallback , has_mount = has_mount )
54+ return Module (pkg_names [0 ], fallback = fallback , exports_mount = exports_mount )
5555 else :
5656 return [
57- Module (pkg , fallback = fallback , has_mount = has_mount ) for pkg in pkg_names
57+ Module (pkg , fallback = fallback , exports_mount = exports_mount )
58+ for pkg in pkg_names
5859 ]
5960
6061
@@ -74,7 +75,7 @@ class Module:
7475 ``./some-other-installed-module.js``.
7576 fallack:
7677 What to display while the modules is being loaded.
77- has_mount :
78+ exports_mount :
7879 Whether the module exports a ``mount`` function that allows components to
7980 be mounted directly to the DOM. Such a mount function enables greater
8081 flexibility in how custom components can be implemented.
@@ -90,7 +91,7 @@ class Module:
9091 "url" ,
9192 "fallback" ,
9293 "exports" ,
93- "has_mount " ,
94+ "exports_mount " ,
9495 "check_exports" ,
9596 "_export_names" ,
9697 )
@@ -100,11 +101,11 @@ def __init__(
100101 url_or_name : str ,
101102 source_file : Optional [Union [str , Path ]] = None ,
102103 fallback : Optional [str ] = None ,
103- has_mount : bool = False ,
104+ exports_mount : bool = False ,
104105 check_exports : bool = True ,
105106 ) -> None :
106107 self .fallback = fallback
107- self .has_mount = has_mount
108+ self .exports_mount = exports_mount
108109 self .check_exports = check_exports
109110
110111 self .exports : Set [str ] = set ()
@@ -126,9 +127,9 @@ def __init__(
126127 else :
127128 raise ValueError (f"{ url_or_name !r} is not installed or is not a URL" )
128129
129- if check_exports and has_mount and "mount" not in self .exports :
130+ if check_exports and exports_mount and "mount" not in self .exports :
130131 raise ValueError (
131- f"Module { url_or_name !r} does not export 'mount' but has_mount =True"
132+ f"Module { url_or_name !r} does not export 'mount' but exports_mount =True"
132133 )
133134
134135 def declare (
@@ -157,7 +158,7 @@ def declare(
157158 self .url ,
158159 name ,
159160 has_children = has_children ,
160- has_mount = self .has_mount ,
161+ exports_mount = self .exports_mount ,
161162 fallback = fallback or self .fallback ,
162163 )
163164
@@ -190,10 +191,10 @@ def __init__(
190191 module : str ,
191192 name : str ,
192193 has_children : bool = True ,
193- has_mount : bool = False ,
194+ exports_mount : bool = False ,
194195 fallback : Optional [str ] = None ,
195196 ) -> None :
196- if IDOM_CLIENT_MODULES_MUST_HAVE_MOUNT .current and not has_mount :
197+ if IDOM_CLIENT_MODULES_MUST_HAVE_MOUNT .current and not exports_mount :
197198 # This check is not perfect since IDOM_CLIENT_MODULES_MUST_HAVE_MOUNT can be
198199 # set after Import instances have been constructed. A more comprehensive
199200 # check can be introduced if that is shown to be an issue in practice.
@@ -203,7 +204,7 @@ def __init__(
203204 self ._name = name
204205 self ._constructor = make_vdom_constructor (name , has_children )
205206 self ._import_source = ImportSourceDict (
206- source = module , fallback = fallback , hasMount = has_mount
207+ source = module , fallback = fallback , exportsMount = exports_mount
207208 )
208209
209210 def __call__ (
0 commit comments