|
4 | 4 | from importlib.metadata import entry_points |
5 | 5 | from inspect import getmodule |
6 | 6 | from logging import Logger |
7 | | -from typing import Any |
| 7 | +from typing import Any, cast |
8 | 8 |
|
9 | 9 | from cppython.core.plugin_schema.generator import Generator |
10 | 10 | from cppython.core.plugin_schema.provider import Provider |
@@ -317,7 +317,7 @@ def create_scm( |
317 | 317 | cppython_plugin_data = resolve_cppython_plugin(core_data.cppython_data, scm_type) |
318 | 318 | scm_data = resolve_scm(core_data.project_data, cppython_plugin_data) |
319 | 319 |
|
320 | | - plugin = scm_type(scm_data) |
| 320 | + plugin = cast(SCM, scm_type(scm_data)) |
321 | 321 |
|
322 | 322 | return plugin |
323 | 323 |
|
@@ -354,7 +354,7 @@ def create_generator( |
354 | 354 | cppython_data=cppython_plugin_data, |
355 | 355 | ) |
356 | 356 |
|
357 | | - return generator_type(generator_data, core_plugin_data, generator_configuration) |
| 357 | + return cast(Generator, generator_type(generator_data, core_plugin_data, generator_configuration)) |
358 | 358 |
|
359 | 359 | def create_provider( |
360 | 360 | self, |
@@ -389,7 +389,7 @@ def create_provider( |
389 | 389 | cppython_data=cppython_plugin_data, |
390 | 390 | ) |
391 | 391 |
|
392 | | - return provider_type(provider_data, core_plugin_data, provider_configuration) |
| 392 | + return cast(Provider, provider_type(provider_data, core_plugin_data, provider_configuration)) |
393 | 393 |
|
394 | 394 |
|
395 | 395 | class Builder: |
|
0 commit comments