pyvider 2025-02-10
Codebase-wide modernization of type hints
54 files · 2,276+ · 1,121-

Modern Type Hints

47 files changed
  • capabilities.py Updated capabilities.py (+3/-5 lines)
  • .gitignore Updated .gitignore (+1/-1 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • bfiles-20250129-173732-grpc-python-example.txt Added bfiles-20250129-173732-grpc-python-example.txt (+615 lines)
  • speeding-it-up.md Added speeding-it-up.md (+7 lines)
  • tf-test.log.txt Added tf-test.log.txt (+128 lines)
  • clean-tf-logs Updated clean-tf-logs (+10/-6 lines)
  • __main__.py Updated __main__.py (+109/-61 lines)
  • auth.py Updated auth.py (+10/-8 lines)
  • __init__.py Added __init__.py (+4 lines)
  • get_provider_schema.py Updated get_provider_schema.py (+6/-7 lines)
  • stop_provider.py Added stop_provider.py (+46 lines)
  • base.py Updated base.py (+2/-2 lines)
  • __init__.py Updated __init__.py (+2/-1 lines)
  • client.py Updated client.py (+9/-9 lines)
  • config.py Updated config.py (+53/-22 lines)
  • debug.py Updated debug.py (+1/-1 lines)
  • handshake.py Updated handshake.py (+18/-17 lines)
  • protocol.py Updated protocol.py (+3/-4 lines)
  • server.py Updated server.py (+150/-125 lines)
  • conftest.py Updated conftest.py (+98/-24 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • test_handshake_magic_cookie.py Updated test_handshake_magic_cookie.py (+7/-5 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • test_server.py Updated test_server.py (+49/-18 lines)
  • test_server_coverage.py Updated test_server_coverage.py (+149/-78 lines)
  • test_server_coverage_extra.py Updated test_server_coverage_extra.py (+76/-54 lines)
  • test_server_destructor_cleanup.py Updated test_server_destructor_cleanup.py (+20/-25 lines)
  • x_segfault_test_server_coverage_extra.py Removed x_segfault_test_server_coverage_extra.py (-290 lines)
  • test_transport_unix_2.py Updated test_transport_unix_2.py (+1/-1 lines)
  • __init__.py Updated __init__.py (+0/-0 lines)
  • tls-check.py Updated tls-check.py (+5/-5 lines)
  • connection.py Added connection.py (+8 lines)
  • schema.py Updated schema.py (+8/-6 lines)
  • __init__.py Updated __init__.py (+10/-2 lines)
  • base.py Updated base.py (+24/-5 lines)
  • base.py Updated base.py (+2/-2 lines)
  • decorators.py Updated decorators.py (+1/-1 lines)
  • list.py Updated list.py (+4/-5 lines)
  • map.py Updated map.py (+3/-3 lines)
  • object.py Updated object.py (+7/-7 lines)
  • tuple.py Updated tuple.py (+3/-4 lines)
  • type.py Updated type.py (+3/-3 lines)
  • Replaced Dict[str, ...] with dict[str, ...] throughout: decouple internal
    52 files
    • .gitignore
    • dynamic_config.py
    • file_content.py
    • test_file_content.py
    • bfiles-20250129-173732-grpc-python-example.txt
    • speeding-it-up.md
    • __main__.py
    • auth.py
    • handler.py
    • capabilities.py
    • __init__.py
    • terraform_handshake.py
    • __init__.py
    • get_provider_schema.py
    • stop_provider.py
    • base.py
    • registry.py
    • __init__.py
    • client.py
    • config.py
    • debug.py
    • handshake.py
    • protocol.py
    • server.py
    • conftest.py
    • __init__.py
    • __init__.py
    • __init__.py
    • test_handshake_magic_cookie.py
    • __init__.py
    • __init__.py
    • test_server.py
    • test_server_coverage.py
    • test_server_coverage_extra.py
    • test_server_destructor_cleanup.py
    • x_segfault_test_server_coverage_extra.py
    • test_transport_unix_2.py
    • __init__.py
    • tls-check.py
    • connection.py
    • schema.py
    • __init__.py
    • base.py
    • base.py
    • list.py
    • map.py
    • object.py
    • tuple.py
    • type.py
    • __init__.py
    • crypto.py
    • test_terraform_handshake.py
  • Replaced List[str] with list[str] in capabilities.py decouple internal
    1 file
    • capabilities.py
  • Replaced Set[str] with set[str] in capabilities.py decouple internal
    1 file
    • capabilities.py

Handler Restructure

1 file changed
  • handler.py Updated handler.py (+78/-202 lines)
  • Rewrote handler.py as @attrs.define ProviderHandler(ProviderServicer) with _handlers: dict[str, Callable] factory decouple internal
    1 file
    • handler.py
  • Uses __attrs_post_init__ to initialize handler mapping decouple internal
    1 file
    • handler.py

Import Modernization

6 files changed
  • dynamic_config.py Updated dynamic_config.py (+13/-8 lines)
  • file_content.py Updated file_content.py (+182/-96 lines)
  • test_file_content.py Updated test_file_content.py (+342/-2 lines)
  • registry.py Updated registry.py (+5/-3 lines)
  • __init__.py Removed __init__.py (-1 lines)
  • crypto.py Updated crypto.py (+1/-2 lines)
  • Removed unused typing imports (Dict, List, Set) across multiple modules specify internal
    3 files
    • __init__.py
    • terraform_handshake.py
    • test_terraform_handshake.py
  • Added proper module header comments to resources/registry.py specify errata
    1 file
    • registry.py
  • Removed unused utils/__init__.py import deprecate internal
    1 file
    • __init__.py