Skip to content

Commit ffb4298

Browse files
committed
mypy
1 parent 1d56d7f commit ffb4298

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nodescraper/pluginregistry.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import inspect
2929
import pkgutil
3030
import types
31-
from typing import Optional, Sequence
31+
from typing import Optional
3232

3333
import nodescraper.connection as internal_connections
3434
import nodescraper.plugins as internal_plugins
@@ -123,12 +123,11 @@ def load_plugins_from_entry_points() -> dict[str, type]:
123123

124124
try:
125125
# Python 3.10+ supports group parameter
126-
eps: Sequence[importlib.metadata.EntryPoint]
127126
try:
128127
eps = importlib.metadata.entry_points(group="nodescraper.plugins") # type: ignore[call-arg]
129128
except TypeError:
130129
# Python 3.9 - entry_points() returns dict-like object
131-
all_eps = importlib.metadata.entry_points()
130+
all_eps = importlib.metadata.entry_points() # type: ignore[assignment]
132131
eps = all_eps.get("nodescraper.plugins", []) # type: ignore[assignment, attr-defined]
133132

134133
for entry_point in eps:

0 commit comments

Comments
 (0)