Skip to content

Commit e0f4336

Browse files
authored
Address comments from API review: **kwargs pass through; make keyword arguments keyword-only (Azure#34467)
* Remove **_kwargs and make keyword arguments keyword-only * Update docstring: ":keyword" * Add **kwargs
1 parent e230167 commit e0f4336

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_data_operations.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,24 +750,25 @@ def share(
750750
def mount(
751751
self,
752752
path: str,
753+
*,
753754
mount_point: Optional[str] = None,
754755
mode: str = "ro_mount",
755756
debug: bool = False,
756757
persistent: bool = False,
757-
**_kwargs,
758+
**kwargs,
758759
) -> None:
759760
"""Mount a data asset to a local path, so that you can access data inside it
760761
under a local path with any tools of your choice.
761762
762763
:param path: The data asset path to mount, in the form of `azureml:<name>` or `azureml:<name>:<version>`.
763764
:type path: str
764-
:param mount_point: A local path used as mount point.
765+
:keyword mount_point: A local path used as mount point.
765766
:type mount_point: str
766-
:param mode: Mount mode. Only `ro_mount` (read-only) is supported for data asset mount.
767+
:keyword mode: Mount mode. Only `ro_mount` (read-only) is supported for data asset mount.
767768
:type mode: str
768-
:param debug: Whether to enable verbose logging.
769+
:keyword debug: Whether to enable verbose logging.
769770
:type debug: bool
770-
:param persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
771+
:keyword persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
771772
where the 'CI_NAME' environment variable is set."
772773
:type persistent: bool
773774
:return: None
@@ -809,6 +810,7 @@ def mount(
809810
)
810811
],
811812
api_version="2021-01-01",
813+
**kwargs,
812814
)
813815
print(f"Mount requested [name: {mount_name}]. Waiting for completion ...")
814816
while True:

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_datastore_operations.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,24 +241,25 @@ def create_or_update(self, datastore: Datastore) -> Datastore: # type: ignore
241241
def mount(
242242
self,
243243
path: str,
244+
*,
244245
mount_point: Optional[str] = None,
245246
mode: str = "ro_mount",
246247
debug: bool = False,
247248
persistent: bool = False,
248-
**_kwargs,
249+
**kwargs,
249250
) -> None:
250251
"""Mount a datastore to a local path, so that you can access data inside it
251252
under a local path with any tools of your choice.
252253
253254
:param path: The data store path to mount, in the form of `<name>` or `azureml://datastores/<name>`.
254255
:type path: str
255-
:param mount_point: A local path used as mount point.
256+
:keyword mount_point: A local path used as mount point.
256257
:type mount_point: str
257-
:param mode: Mount mode, either `ro_mount` (read-only) or `rw_mount` (read-write).
258+
:keyword mode: Mount mode, either `ro_mount` (read-only) or `rw_mount` (read-write).
258259
:type mode: str
259-
:param debug: Whether to enable verbose logging.
260+
:keyword debug: Whether to enable verbose logging.
260261
:type debug: bool
261-
:param persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
262+
:keyword persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
262263
where the 'CI_NAME' environment variable is set."
263264
:type persistent: bool
264265
:return: None
@@ -300,6 +301,7 @@ def mount(
300301
)
301302
],
302303
api_version="2021-01-01",
304+
**kwargs,
303305
)
304306
print(f"Mount requested [name: {mount_name}]. Waiting for completion ...")
305307
while True:

0 commit comments

Comments
 (0)