Skip to content

Commit 6852647

Browse files
authored
Fix ActivityIndicator context entering (#197)
This commit enables statements like... with ActivityIndicator(view) as i: ...
1 parent ae23d0d commit 6852647

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sublime_lib/activity_indicator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ def __init__(
8989
def __del__(self) -> None:
9090
self._target.clear()
9191

92-
def __enter__(self) -> None:
92+
def __enter__(self) -> ActivityIndicator:
9393
self.start()
94+
return self
9495

9596
def __exit__(
9697
self,

0 commit comments

Comments
 (0)