Skip to content

Commit

Permalink
Apply ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jun 13, 2024
1 parent ba5594a commit 24a3a5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ def setHiding(self, enable=True):
self._hideBackround = self.hideBackround if enable else False

def canCloseShape(self):
return self.drawing() and ((self.current and len(self.current) > 2) or self.createMode in ["ai_polygon", "ai_mask"])
return self.drawing() and (
(self.current and len(self.current) > 2)
or self.createMode in ["ai_polygon", "ai_mask"]
)

def mouseDoubleClickEvent(self, ev):
if self.double_click != "close":
Expand Down

0 comments on commit 24a3a5f

Please sign in to comment.