@@ -102,10 +102,10 @@ def __init__(
102102
103103 @classmethod
104104 def from_config (cls , config : Configuration | None = None ) -> Snapshotter :
105- """Create a new instance based on the provided configuration .
105+ """Create a new instance based on the provided `Configuration` .
106106
107107 Args:
108- config: The configuration object . Uses the global (default) configuration if not provided.
108+ config: The `Configuration` instance . Uses the global (default) one if not provided.
109109 """
110110 config = service_locator .get_configuration ()
111111
@@ -132,7 +132,7 @@ def _get_sorted_list_by_created_at(input_list: list[T]) -> SortedList[T]:
132132
133133 @property
134134 def active (self ) -> bool :
135- """Indicates whether the context is active."""
135+ """Indicate whether the context is active."""
136136 return self ._active
137137
138138 async def __aenter__ (self ) -> Snapshotter :
@@ -178,7 +178,7 @@ async def __aexit__(
178178
179179 @ensure_context
180180 def get_memory_sample (self , duration : timedelta | None = None ) -> list [Snapshot ]:
181- """Returns a sample of the latest memory snapshots.
181+ """Return a sample of the latest memory snapshots.
182182
183183 Args:
184184 duration: The duration of the sample from the latest snapshot. If omitted, it returns a full history.
@@ -191,7 +191,7 @@ def get_memory_sample(self, duration: timedelta | None = None) -> list[Snapshot]
191191
192192 @ensure_context
193193 def get_event_loop_sample (self , duration : timedelta | None = None ) -> list [Snapshot ]:
194- """Returns a sample of the latest event loop snapshots.
194+ """Return a sample of the latest event loop snapshots.
195195
196196 Args:
197197 duration: The duration of the sample from the latest snapshot. If omitted, it returns a full history.
@@ -204,7 +204,7 @@ def get_event_loop_sample(self, duration: timedelta | None = None) -> list[Snaps
204204
205205 @ensure_context
206206 def get_cpu_sample (self , duration : timedelta | None = None ) -> list [Snapshot ]:
207- """Returns a sample of the latest CPU snapshots.
207+ """Return a sample of the latest CPU snapshots.
208208
209209 Args:
210210 duration: The duration of the sample from the latest snapshot. If omitted, it returns a full history.
@@ -217,7 +217,7 @@ def get_cpu_sample(self, duration: timedelta | None = None) -> list[Snapshot]:
217217
218218 @ensure_context
219219 def get_client_sample (self , duration : timedelta | None = None ) -> list [Snapshot ]:
220- """Returns a sample of the latest client snapshots.
220+ """Return a sample of the latest client snapshots.
221221
222222 Args:
223223 duration: The duration of the sample from the latest snapshot. If omitted, it returns a full history.
@@ -230,7 +230,7 @@ def get_client_sample(self, duration: timedelta | None = None) -> list[Snapshot]
230230
231231 @staticmethod
232232 def _get_sample (snapshots : list [Snapshot ], duration : timedelta | None = None ) -> list [Snapshot ]:
233- """Returns a time-limited sample from snapshots or full history if duration is None."""
233+ """Return a time-limited sample from snapshots or full history if duration is None."""
234234 if not duration :
235235 return snapshots
236236
0 commit comments