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

Reconstruct defaulted arg values from docstring #147

Merged
merged 9 commits into from
Sep 19, 2023

Conversation

sizmailov
Copy link
Owner

Changes:

  • Recognize Python literal strings in default arg as "print-safe"
  • Add --print-safe-value-reprs=REGEX CLI option to override the print-safe flag of Value (for custom reprs provided via pybind11::arg_v())
  • Add --enum-class-locations=REGEX:LOC CLI option to rewrite enum values as valid Python expressions with correct imports. This change introduces new errors since earlier Enum-like representations (e.g. <MyEnum.Value: 1>) were treated as non-printable Values and rendered as ....

Fixes #145

@sizmailov sizmailov merged commit 27d16df into master Sep 19, 2023
11 checks passed
@sizmailov sizmailov deleted the fix-print-safe-default-args branch September 19, 2023 18:20
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.

Support default argument values
1 participant