From 21326dd2229bb0ffb11e70f4d0ad20781f1e1f96 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Mon, 19 May 2025 13:23:02 +0300 Subject: [PATCH] [+] improve typing --- python/online/fxreader/pr34/commands_typed/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/online/fxreader/pr34/commands_typed/cli.py b/python/online/fxreader/pr34/commands_typed/cli.py index c3119a9..0e8c342 100644 --- a/python/online/fxreader/pr34/commands_typed/cli.py +++ b/python/online/fxreader/pr34/commands_typed/cli.py @@ -18,10 +18,13 @@ from typing import ( Literal, Any, MutableMapping, + Mapping, + IO, ) from typing_extensions import ( cast, + Callable, ) logger = logging.getLogger(__name__) @@ -748,10 +751,14 @@ class CLI(abc.ABC): del p del pyproject_tool - tomlkit.dump( + cast( + Callable[[Mapping[Any, Any], IO[str] | IO[bytes]], None], + getattr(tomlkit, 'dump'), + )( pyproject2, f ) + del pyproject2 del module