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

Strip comments from function definitions #1

Open
tmr232 opened this issue Jan 2, 2025 · 0 comments
Open

Strip comments from function definitions #1

tmr232 opened this issue Jan 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@tmr232
Copy link
Owner

tmr232 commented Jan 2, 2025

The current method to extract a function definition (span from start of function to the function body) may include comments.
This specifically happens in CPython tests (https://github.com/tmr232/cfgbot/actions/runs/12576476224/job/35052659314).
So we need to strip them.

The "good" solution would be to drop comments as we generate the function def.
The "bad" solution, which I'll probably go with first, is to strip Python comments in the publishing step, as it's was easier.

@tmr232 tmr232 added the bug Something isn't working label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant