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

Add exclude patterns to AST rewrites #36

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Add exclude patterns to AST rewrites #36

merged 3 commits into from
Oct 25, 2023

Conversation

rth
Copy link
Member

@rth rth commented Oct 25, 2023

Numpy does some docstring manipulation in numpy/core/overrides.py that fails if we strip module docstrings (at least for 1.25.2, that files is significantly changed in 1.26 so it might not be an issue)

This adds the ability for some file names to be excluded from AST rewriting. Currently, it's a list of filename patterns in pyodide_pack/ast_rewrite.py, we could make this configurable later if needed. I'll look into checking if there are any other issues for Pyodide packages once #35 is merged.

Also adds the bug fix for stripping docstring from a function with an empty body (initially added in #35)

@rth rth merged commit a12b4af into pyodide:main Oct 25, 2023
2 checks passed
@rth rth deleted the ast-excludes branch October 25, 2023 14:35
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