Skip to content

Commit

Permalink
Fix some linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannica committed Feb 19, 2025
1 parent d691f33 commit a353524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/zenml/zen_server/rbac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _dehydrate_value(
return value


def has_permissions_for_model(model: AnyResponse, action: Action) -> bool:
def has_permissions_for_model(model: AnyModel, action: Action) -> bool:
"""If the active user has permissions to perform the action on the model.
Args:
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_allowed_resource_ids(
if not server_config().rbac_enabled:
return None

if ResourceType(resource_type).is_workspace_scoped and not workspace_id:
if ResourceType(resource_type).is_workspace_scoped() and not workspace_id:
raise ValueError(
"Workspace ID is required to list workspace scoped resources."
)
Expand Down
4 changes: 2 additions & 2 deletions src/zenml/zen_stores/sql_zen_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -11352,14 +11352,14 @@ def _attach_tags_to_resource(
try:
tag = self.get_tag(tag_name)
self._verify_workspace(
expected_workspace_id=resource.workspace_id, # type: ignore[attr-defined]
expected_workspace_id=resource.workspace_id,
obj=tag,
)
except KeyError:
tag = self.create_tag(
TagRequest(
name=tag_name,
workspace=resource.workspace_id, # type: ignore[attr-defined]
workspace=resource.workspace_id,
)
)
try:
Expand Down

0 comments on commit a353524

Please sign in to comment.