Skip to content

refactor: Improve expressions#194

Merged
pawamoy merged 1 commit intomainfrom
better-expressions
Aug 7, 2023
Merged

refactor: Improve expressions#194
pawamoy merged 1 commit intomainfrom
better-expressions

Conversation

@pawamoy
Copy link
Copy Markdown
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
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