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

Please support the underscore character as a binding name #488

Open
danielniccoli opened this issue Feb 27, 2024 · 0 comments
Open

Please support the underscore character as a binding name #488

danielniccoli opened this issue Feb 27, 2024 · 0 comments
Labels
Enhancement Feature requests. P3 Priority 3

Comments

@danielniccoli
Copy link

The following code will result in the error: The binding name hello_city is invalid. Please assign a valid name to the binding.

# Orchestrator
@myApp.orchestration_trigger(context_name="context")
def hello_orchestrator(context):
    result1 = yield context.call_activity("hello", "Seattle")
    result2 = yield context.call_activity("hello", "Tokyo")
    result3 = yield context.call_activity("hello", "London")

    return [result1, result2, result3]

# Activity
@myApp.activity_trigger(input_name="hello_city")
def hello(hello_city: str):
    return f"Hello {hello_city}"

PEP8 suggests the use of snake_case. Hence underscores should be supported when writing durable functions in Python. Please add support for snake_case in binding names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests. P3 Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants