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

refactor: Improve expressions #194

Merged
merged 1 commit into from
Aug 7, 2023
Merged

refactor: Improve expressions #194

merged 1 commit into from
Aug 7, 2023

Conversation

pawamoy
Copy link
Member

@pawamoy pawamoy commented Aug 4, 2023

Expressions are now proper objects, not just recursive lists of strings and names. This increases robustness for checking if an expression is a tuple, an iterator, etc., and when getting the n-th item of tuples, etc.

This will also make it easier to write powerful and robust Griffe extensions.

Breaking changes:

  • griffe.expressions.Name was removed
  • griffe.expressions.Expression was removed
  • mkdocstrings-python 1.2.1 templates won't work
    with the new expressions

Expressions are now proper objects,
not just recursive lists of strings and names.
This increases robustness for checking if
an expression is a tuple, an iterator, etc.,
and when getting the n-th item of tuples, etc.

This will also make it easier to write
powerful and robust Griffe extensions.

Breaking changes:
- `griffe.expressions.Name` was removed
- `griffe.expressions.Expression` was removed
- mkdocstrings-python 1.2.1 templates won't work
  with the new expressions
@pawamoy pawamoy merged commit 66c8ad5 into main Aug 7, 2023
31 of 33 checks passed
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