Code styling tweaks to core helpers (#85441)

This commit is contained in:
Franck Nijhof
2023-01-09 00:44:09 +01:00
committed by GitHub
parent cf5fca0464
commit 06a35fb7db
22 changed files with 192 additions and 100 deletions

View File

@@ -90,11 +90,11 @@ class EntityComponent(Generic[_EntityT]):
@property
def entities(self) -> Iterable[_EntityT]:
"""
Return an iterable that returns all entities.
"""Return an iterable that returns all entities.
As the underlying dicts may change when async context is lost, callers that
iterate over this asynchronously should make a copy using list() before iterating.
As the underlying dicts may change when async context is lost,
callers that iterate over this asynchronously should make a copy
using list() before iterating.
"""
return chain.from_iterable(
platform.entities.values() # type: ignore[misc]