Skip to content

Keep the letters at the ends of an executor code block - #169

Open
SashaMIT wants to merge 1 commit into
OpenBMB:mainfrom
SashaMIT:codered-python-strip
Open

SashaMIT wants to merge 1 commit into
OpenBMB:mainfrom
SashaMIT:codered-python-strip

Conversation

@SashaMIT

Copy link
Copy Markdown

Summary

  • The humaneval executor cleaned a code block with strip("python"). That removes the letters p, y, t, h, o, and n from both ends.
  • return n came back as return . print(1) came back as rint(1). A python or python3 tag at the front is still removed. return n stays return n. print(1) stays print(1).

Test plan

  • python -m unittest tests.test_humaneval_executor
  • Red on tip: return vs return n, and rint(1) vs print(1). Green after: both lines stay intact.

strip("python") deletes every p, y, t, h, o, and n from both ends, so return n came back as return and print(1) came back as rint(1).
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.

1 participant