| Total Complexity | 3 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | from typing import Type |
||
| 6 | class Application: |
||
| 7 | def __init__(self, settings: Type[AbstractSettings], routes: list) -> None: |
||
| 8 | self._settings = settings |
||
| 9 | self._initialize_settings(routes) |
||
| 10 | |||
| 11 | def _initialize_settings(self, routes: list): |
||
| 12 | self._settings.init_from_string('router', routes=routes) |
||
| 13 | self._settings.init_from_string('runner', router=self._settings.router) |
||
| 14 | |||
| 15 | def run(self) -> None: |
||
| 16 | self._settings.runner.run(self._settings) |
||
| 17 |