Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kovalsky committed Sep 10, 2024
1 parent a42ec1b commit fcdda13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
16 changes: 6 additions & 10 deletions src/sempy_labs/_list_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,10 +1147,6 @@ def create_warehouse(
The Fabric workspace name.
Defaults to None which resolves to the workspace of the attached lakehouse
or if no lakehouse attached, resolves to the workspace of the notebook.
Returns
-------
"""

(workspace, workspace_id) = resolve_workspace_name_and_id(workspace)
Expand All @@ -1162,11 +1158,11 @@ def create_warehouse(

client = fabric.FabricRestClient()
response = client.post(
f"/v1/workspaces/{workspace_id}/warehouses/", json=request_body, lro_wait=True
f"/v1/workspaces/{workspace_id}/warehouses/", json=request_body
)

if response.status_code != 200:
raise FabricHTTPException(response)
lro(client, response, status_codes=[201, 202])

print(
f"{icons.green_dot} The '{warehouse}' warehouse has been created within the '{workspace}' workspace."
)
Expand Down Expand Up @@ -1851,10 +1847,10 @@ def create_custom_pool(

client = fabric.FabricRestClient()
response = client.post(
f"/v1/workspaces/{workspace_id}/spark/pools", json=request_body, lro_wait=True
f"/v1/workspaces/{workspace_id}/spark/pools", json=request_body
)

if response.status_code != 200:
if response.status_code != 201:
raise FabricHTTPException(response)
print(
f"{icons.green_dot} The '{pool_name}' spark pool has been created within the '{workspace}' workspace."
Expand Down Expand Up @@ -2059,7 +2055,7 @@ def unassign_workspace_from_capacity(workspace: Optional[str] = None):

client = fabric.FabricRestClient()
response = client.post(
f"/v1/workspaces/{workspace_id}/unassignFromCapacity", lro_wait=True
f"/v1/workspaces/{workspace_id}/unassignFromCapacity"
)

if response.status_code not in [200, 202]:
Expand Down
1 change: 0 additions & 1 deletion src/sempy_labs/_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def translate_semantic_model(
-------
pandas.DataFrame
Shows a pandas dataframe which displays all of the translations in the semantic model.
"""

from synapse.ml.services import Translate
Expand Down

0 comments on commit fcdda13

Please sign in to comment.