Skip to content

Commit

Permalink
Fix incompatible cast
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbuwen committed Aug 17, 2023
1 parent 4f8e0f7 commit c2725cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion skillbridge/client/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def encode_dir(obj: SkillCode) -> SkillCode:
@staticmethod
def decode_dir(code: str) -> list[str]:
attributes = _skill_value_to_python(code) or ()
return [camel_to_snake(attr) for attr in cast(list[str], attributes)]
return [camel_to_snake(attr) for attr in cast('list[str]', attributes)]

@staticmethod
def encode_getattr(
Expand Down
2 changes: 1 addition & 1 deletion skillbridge/client/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def close(self, log_exception: bool = True) -> None:
_open_workspaces.pop(self.id, None)

if current_workspace.id == self.id:
current_workspace.__class__ = cast(type[Workspace], _NoWorkspace)
current_workspace.__class__ = cast('type[Workspace]', _NoWorkspace)
current_workspace.__dict__ = {}

@property
Expand Down

0 comments on commit c2725cc

Please sign in to comment.