summaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py3/twisted/plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python/Twisted/py3/twisted/plugin.py')
-rw-r--r--contrib/python/Twisted/py3/twisted/plugin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/python/Twisted/py3/twisted/plugin.py b/contrib/python/Twisted/py3/twisted/plugin.py
index 45180014cdc..ecda72ae02d 100644
--- a/contrib/python/Twisted/py3/twisted/plugin.py
+++ b/contrib/python/Twisted/py3/twisted/plugin.py
@@ -10,12 +10,14 @@ Plugin system for Twisted.
@author: Glyph Lefkowitz
"""
+from __future__ import annotations
import os
import pickle
import sys
import types
-from typing import Iterable, Optional, Type, TypeVar
+from collections.abc import Iterable
+from typing import TypeVar
from zope.interface import Interface, providedBy
@@ -196,7 +198,7 @@ _TInterface = TypeVar("_TInterface", bound=Interface)
def getPlugins(
- interface: Type[_TInterface], package: Optional[types.ModuleType] = None
+ interface: type[_TInterface], package: types.ModuleType | None = None
) -> Iterable[_TInterface]:
"""
Retrieve all plugins implementing the given interface beneath the given module.