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

Enable arg converters #14

Open
LachlanMarnham opened this issue Jan 18, 2022 · 1 comment
Open

Enable arg converters #14

LachlanMarnham opened this issue Jan 18, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@LachlanMarnham
Copy link
Owner

Command line args are all passed as strings. There should be a way to register converters for a target. Without converters:

@registry.register_target
def target_with_params(param):
    print('param is a string')

Prototype design:

@registry.register_target(converters={'param': int})
def target_with_params(param):
    print('param is an int')

with param = int(param) being called behind the scenes, but an arbitrary converter callback should be acceptable.

@LachlanMarnham
Copy link
Owner Author

Currently blocked by #6 and #7

@LachlanMarnham LachlanMarnham self-assigned this Jan 18, 2022
@LachlanMarnham LachlanMarnham added the enhancement New feature or request label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant