diff --git a/python/online/fxreader/pr34/commands_typed/crypto.py b/python/online/fxreader/pr34/commands_typed/crypto.py index 827fb0d..d76f8f8 100644 --- a/python/online/fxreader/pr34/commands_typed/crypto.py +++ b/python/online/fxreader/pr34/commands_typed/crypto.py @@ -2,6 +2,7 @@ import base64 import os import cryptography.hazmat.primitives.kdf.scrypt +import cryptography.exceptions from typing import (Literal, overload, Optional,) diff --git a/python/online/fxreader/pr34/commands_typed/mypy.py b/python/online/fxreader/pr34/commands_typed/mypy.py index 9abd9eb..2e5ad9d 100644 --- a/python/online/fxreader/pr34/commands_typed/mypy.py +++ b/python/online/fxreader/pr34/commands_typed/mypy.py @@ -67,7 +67,7 @@ def run( argv = [] if settings is None: - settings = MypySettings() + settings = MypySettings.model_validate(dict()) parser = argparse.ArgumentParser() parser.add_argument( @@ -213,4 +213,4 @@ def run( if __name__ == '__main__': from . import logging as _logging _logging.setup() - run(sys.argv[1:]) \ No newline at end of file + run(sys.argv[1:]) diff --git a/python/online/fxreader/pr34/commands_typed/pip.py b/python/online/fxreader/pr34/commands_typed/pip.py index 23739bf..b8e086a 100644 --- a/python/online/fxreader/pr34/commands_typed/pip.py +++ b/python/online/fxreader/pr34/commands_typed/pip.py @@ -11,6 +11,8 @@ import unittest.mock import logging import typing +from typing_extensions import (cast,) + if typing.TYPE_CHECKING: import pip._internal.commands.show import pip._internal.commands.download @@ -30,13 +32,24 @@ from typing import ( logger = logging.getLogger(__name__) +class pip_show_t: + class res_t: + class package_info_t: + pass + def pip_show( argv: list[str], -) -> list['pip._internal.commands.show._PackageInfo']: +) -> list[ + # 'pip._internal.commands.show._PackageInfo' + pip_show_t.res_t.package_info_t, +]: import pip._internal.commands.show - return list( - pip._internal.commands.show.search_packages_info( - argv, + return cast( + list[pip_show_t.res_t.package_info_t], + list( + pip._internal.commands.show.search_packages_info( + argv, + ) ) ) @@ -138,7 +151,13 @@ def pip_resolve( # t1._in_main_context = True session = t1.get_default_session(options) target_python = pip._internal.cli.cmdoptions.make_target_python(options) - finder = t1._build_package_finder( + finder = cast( + getattr( + t1, + '_build_package_finder' + ) + ) + t1._build_package_finder( options=options, session=session, target_python=target_python, diff --git a/python/pyproject.toml b/python/pyproject.toml index c7fb665..378767e 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -121,6 +121,7 @@ extraPaths = [ '.', '../mypy-stubs', '../mypy-stubs/types-debugpy', + '../mypy-stubs/marisa-trie-types', # '../../../../../', ] #strict = ["src"]