Skip to content

Conversation

@olliesilvester
Copy link
Collaborator

@olliesilvester olliesilvester commented May 29, 2025

Fixes #86 and #87

To test:

  • Run daq-config-server in the devcontainer
  • run pytest . , and confirm both unit and system tests pass
  • Try creating a ConfigServer() client, calling get_file_contents(), and checking the static typing works as expected


from .constants import ENDPOINTS

T = TypeVar("T", str, bytes, dict[Any, Any])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential future change: make T unbounded so that the user can request a specific type of dict. The tradeoff is we'd the static check on whether get_file_contents was called with a supported type - it would be replaced with a runtime check.

@olliesilvester
Copy link
Collaborator Author

Let's ignore project codecov since patch is 100%

Copy link
Collaborator

@Relm-Arrowny Relm-Arrowny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I spotted a couple of typos

Copy link
Collaborator

@Relm-Arrowny Relm-Arrowny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@olliesilvester olliesilvester merged commit 063b951 into main Jun 2, 2025
21 checks passed
@olliesilvester olliesilvester deleted the 86_get_typing_support_on_client branch June 2, 2025 08:41
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.

Get static typing support on the client

3 participants