|
7 | 7 | """ |
8 | 8 |
|
9 | 9 | from pathlib import Path |
10 | | -from typing import Callable, List, Optional |
| 10 | +from typing import Callable, List, Optional, cast |
11 | 11 |
|
12 | 12 | from application.grand import GrandDigestManager, ShadowGrandDigestManager |
13 | 13 | from application.tracking import DigestTimesTracker |
14 | 14 | from config import DigestConfig |
15 | | -from domain.validators import is_valid_dict |
16 | 15 | from domain.constants import ( |
17 | 16 | LEVEL_CONFIG, |
18 | 17 | LOG_PREFIX_DECISION, |
|
22 | 21 | from domain.error_formatter import get_error_formatter |
23 | 22 | from domain.exceptions import DigestError, FileIOError, ValidationError |
24 | 23 | from domain.level_registry import get_level_registry |
25 | | -from domain.types import RegularDigestData, as_dict |
26 | | -from infrastructure import get_default_confirm_callback, get_structured_logger, log_debug, log_warning, save_json |
| 24 | +from domain.types import OverallDigestData, RegularDigestData, as_dict |
| 25 | +from domain.validators import is_valid_dict |
| 26 | +from infrastructure import ( |
| 27 | + get_default_confirm_callback, |
| 28 | + get_structured_logger, |
| 29 | + log_debug, |
| 30 | + log_warning, |
| 31 | + save_json, |
| 32 | +) |
27 | 33 |
|
28 | 34 | _logger = get_structured_logger(__name__) |
29 | 35 |
|
@@ -124,7 +130,7 @@ def update_grand_digest( |
124 | 130 | formatter = get_error_formatter() |
125 | 131 | raise DigestError(formatter.validation.validation_error("RegularDigest", "has no valid overall_digest", None)) |
126 | 132 | # GrandDigestManager.update_digestは例外を投げる(失敗時) |
127 | | - self.grand_digest_manager.update_digest(level, new_digest_name, overall_digest) |
| 133 | + self.grand_digest_manager.update_digest(level, new_digest_name, cast(OverallDigestData, overall_digest)) |
128 | 134 |
|
129 | 135 | def _update_shadow_cascade(self, level: str) -> None: |
130 | 136 | """ |
|
0 commit comments