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

(BUGFIX) Use labels in generate_functions #1056

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scottrblock
Copy link

@scottrblock scottrblock commented Feb 17, 2024

Summary

The existing code has "r'^(?:' + '|'.join({labels}) + ')$'", which is presumably trying to join the labels passed into the function, but the string interpolation does not appear to be correct python. It's not clear to me how important "correctness" is in these functions, but it seems like it would all work better if it was valid python.

My change uses pattern = r'^(?:' + '|'.join(labels.keys()) + ')$'\n",

Motivation

I was looking into how to use functions API and realized there appeared to be a bug in the cookbook example.

@scottrblock scottrblock changed the title Use labels in generate_functions (BUGFIX) Use labels in generate_functions Feb 17, 2024
Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Apr 18, 2024
Copy link

@sarbazvatanatan sarbazvatanatan left a comment

Choose a reason for hiding this comment

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

20240417-164047

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.

None yet

2 participants