Skip to content

Commit d5b9df0

Browse files
committed
Fix unused Self import in example code (pylint violation)
The string annotation '"Self"' caused pylint to flag 'Self' as an unused import since string annotations are not resolved at import time. Remove the quotes so Self is referenced directly as a type annotation, which satisfies pylint. Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
1 parent 00d46d1 commit d5b9df0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/frequenz/dispatch/_actor_dispatcher.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ActorDispatcher(BackgroundService):
109109
```python
110110
import os
111111
import asyncio
112-
from typing import Any
112+
from typing import Any, Self
113113
from typing import override
114114
from frequenz.dispatch import Dispatcher, ActorDispatcher, DispatchInfo
115115
from frequenz.client.common.microgrid.components import ComponentCategory
@@ -134,7 +134,7 @@ def new_with_dispatch(
134134
dispatch_updates_receiver: Receiver[DispatchInfo],
135135
*,
136136
name: str | None = None,
137-
) -> "MyActor":
137+
) -> Self:
138138
self = cls(name=name)
139139
self._dispatch_updates_receiver = dispatch_updates_receiver
140140
self._update_dispatch_information(initial_dispatch)

0 commit comments

Comments
 (0)