File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -120,16 +120,12 @@ def start(self) -> None:
120120
121121 @property
122122 def unique_id (self ) -> str :
123- """The unique ID of this background service.
124-
125- Returns:
126- The unique ID of this background service.
127- """
123+ """The unique ID of this background service."""
128124 return self ._unique_id
129125
130126 @property
131127 def tasks (self ) -> collections .abc .Set [asyncio .Task [Any ]]:
132- """Return the set of running tasks spawned by this background service.
128+ """The set of running tasks spawned by this background service.
133129
134130 Users typically should not modify the tasks in the returned set and only use
135131 them for informational purposes.
@@ -138,20 +134,14 @@ def tasks(self) -> collections.abc.Set[asyncio.Task[Any]]:
138134
139135 Changing the returned tasks may lead to unexpected behavior, don't do it
140136 unless the class explicitly documents it is safe to do so.
141-
142- Returns:
143- The set of running tasks spawned by this background service.
144137 """
145138 return self ._tasks
146139
147140 @property
148141 def is_running (self ) -> bool :
149- """Return whether this background service is running.
142+ """Whether this background service is running.
150143
151144 A service is considered running when at least one task is running.
152-
153- Returns:
154- Whether this background service is running.
155145 """
156146 return any (not task .done () for task in self ._tasks )
157147
You can’t perform that action at this time.
0 commit comments