Skip to content

generator: handle server specs with no variables#83

Merged
brutasse merged 1 commit intomasterfrom
fix/server-without-variables
Mar 6, 2026
Merged

generator: handle server specs with no variables#83
brutasse merged 1 commit intomasterfrom
fix/server-without-variables

Conversation

@brutasse
Copy link
Member

@brutasse brutasse commented Mar 6, 2026

Fix for:

==================================== ERRORS ====================================
________________ ERROR collecting tests/test_partner_client.py _________________
tests/test_partner_client.py:12: in <module>
    from exoscale.api.partner import Client
exoscale/api/partner.py:17: in <module>
    BasePartnerClient = create_client_class(partner_api_spec)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
exoscale/api/generator.py:349: in create_client_class
    "__doc__": _client_docstring(api_spec),
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
exoscale/api/generator.py:303: in _client_docstring
    for name, variable in server["variables"].items():
                          ^^^^^^^^^^^^^^^^^^^
E   KeyError: 'variables'
=========================== short test summary info ============================
ERROR tests/test_partner_client.py - KeyError: 'variables'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.23s ===============================
Error: Process completed with exit code 2.
``

@brutasse brutasse merged commit 03d5a86 into master Mar 6, 2026
6 checks passed
@brutasse brutasse deleted the fix/server-without-variables branch March 6, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant