|
33 | 33 | from betty.multiprocessing import ProcessPoolExecutor |
34 | 34 | from betty.plugin import Plugin, PluginDefinition |
35 | 35 | from betty.plugin.ordered import sort_ordered_plugin_graph |
36 | | -from betty.plugin.repository.provider.service import ( |
37 | | - ServiceLevelPluginRepositoryProvider, |
38 | | -) |
39 | 36 | from betty.portable.file import assert_load_file |
40 | 37 | from betty.service.container import ( |
41 | 38 | ServiceFactory, |
|
53 | 50 | import aiohttp |
54 | 51 |
|
55 | 52 | from betty.cache import Cache |
56 | | - from betty.machine_name import MachineName |
57 | | - from betty.plugin.repository import PluginRepository |
58 | 53 | from betty.user import User |
59 | 54 |
|
60 | 55 | _PluginT = TypeVar("_PluginT", bound=Plugin, default=Plugin) |
@@ -101,19 +96,12 @@ def __init__( |
101 | 96 | self, |
102 | 97 | cache_factory, # ty:ignore[invalid-argument-type] |
103 | 98 | ) |
104 | | - self._plugin_repository_provider = ServiceLevelPluginRepositoryProvider(self) |
105 | 99 |
|
106 | 100 | @override |
107 | 101 | @classmethod |
108 | 102 | def configuration_cls(cls) -> type[AppConfiguration]: |
109 | 103 | return AppConfiguration |
110 | 104 |
|
111 | | - @override |
112 | | - async def plugins( |
113 | | - self, plugin_type: type[_PluginDefinitionT] | MachineName, / |
114 | | - ) -> PluginRepository[_PluginDefinitionT]: |
115 | | - return await self._plugin_repository_provider.plugins(plugin_type) # ty:ignore[invalid-return-type] |
116 | | - |
117 | 105 | @classmethod |
118 | 106 | @asynccontextmanager |
119 | 107 | async def new_from_environment(cls) -> AsyncIterator[Self]: |
@@ -220,7 +208,7 @@ async def http_client(self) -> aiohttp.ClientSession: |
220 | 208 | """ |
221 | 209 | The HTTP client. |
222 | 210 | """ |
223 | | - http_rate_limits = await self.plugins(RateLimitDefinition) |
| 211 | + http_rate_limits = await self.plugins.plugins(RateLimitDefinition) |
224 | 212 | rate_limit_sorter = sort_ordered_plugin_graph( |
225 | 213 | http_rate_limits, http_rate_limits |
226 | 214 | ) |
|
0 commit comments