Skip to content

Commit

Permalink
Avoid using type as a variable name
Browse files Browse the repository at this point in the history
Let's not shadow the built-in type function.
  • Loading branch information
ctrueden committed Jul 16, 2024
1 parent 2073393 commit 2d74715
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/appose/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def ndarray(self):


def _appose_object_hook(obj: Dict):
type = obj.get("appose_type")
if type == "shm":
atype = obj.get("appose_type")
if atype == "shm":
return SharedMemory(name=(obj["name"]), size=(obj["size"]))
elif type == "ndarray":
elif atype == "ndarray":
return NDArray(obj["dtype"], obj["shape"], obj["shm"])
else:
return obj

0 comments on commit 2d74715

Please sign in to comment.