Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc_servicer should use *args to pass positional parameters #335

Open
bkeryan opened this issue Jul 17, 2023 · 0 comments
Open

grpc_servicer should use *args to pass positional parameters #335

bkeryan opened this issue Jul 17, 2023 · 0 comments
Labels
tech debt Non-user-visible improvement to code or development process

Comments

@bkeryan
Copy link
Collaborator

bkeryan commented Jul 17, 2023

Tech Debt

The MeasurementService.configuration_parameter decorator describes positional parameters in order, but grpc_servicer uses inspect.signature to look up the parameter names so that it can use **kwargs to pass them:

https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/_internal/grpc_servicer.py#L98
https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/_internal/grpc_servicer.py#L245

Passing positional parameters with *args would be simpler and have slightly lower overhead.

AB#2457623

@bkeryan bkeryan added the tech debt Non-user-visible improvement to code or development process label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Non-user-visible improvement to code or development process
Projects
None yet
Development

No branches or pull requests

1 participant