mypy: Fix any_generics, redundant_casts, unused_ignores
Add mypy directives disallow_any_generics, warn_redundant_casts, and warn_unused_ignores. Fix all resulting type annotation errors: - load_yaml.py: Add type arguments to dict, tuple, set annotations; fix resolving dict/set types for link keys; handle str|int path types. - misc.py: Add Mapping[str, Any] and Iterable[Any] type arguments; fix multiline export comment to avoid bad pattern flag. - multi_key_dict.py: Add type argument to dict[tuple, Any]. - StringTree.py: Move Any import out of TYPE_CHECKING; fix MutableMapping type args. - serdes.py: Add type argument to re.Match. - Config.py: Change Config from Mapping to Mapping[str, str]; remove unused cast. - ev/base/Object.py, SimpleObject.py, EventLogger.py, PollerOneShot.py: Add Mapping[str, Any] type args. - ev/app/EventRouter.py: Add dict[str, Any] type args in inner functions. - auth/*: Remove now-unnecessary # type: ignore[return-value] comments. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.82.0 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9e24a2f394
commit
f171443d49
2 changed files with 43 additions and 34 deletions
|
|
@ -100,7 +100,7 @@ class Auth(AuthBase): # export
|
|||
@override
|
||||
def _access(
|
||||
self, what: str, access_type: Access | None, who: EntityBase | None
|
||||
) -> bool: # type: ignore[return-value]
|
||||
) -> bool:
|
||||
slog(
|
||||
WARNING,
|
||||
f'Returning False for {access_type} access to resource {what} by {who}'
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class Auth(AuthBase): # export
|
|||
@override
|
||||
def _access(
|
||||
self, what: str, access_type: Access | None, who: EntityBase | None
|
||||
) -> bool: # type: ignore[return-value]
|
||||
) -> bool:
|
||||
slog(
|
||||
WARNING,
|
||||
f'Returning False for {access_type} access to resource {what} by {who}'
|
||||
|
|
|
|||
Loading…
Reference in a new issue