Skip to content

Commit

Permalink
chore: Add note about ExprConstant not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 28, 2025
1 parent 3684cd6 commit d1b6c00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_griffe/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ def iterate(self, *, flat: bool = True) -> Iterator[str | Expr]:
yield from _join(self.conditions, " if ", flat=flat)


# TODO: `ExprConstant` is never instantiated,
# see `_build_constant` below (it always returns the value directly).
# Maybe we could simply get rid of it, as it wouldn't bring much value
# if used anyway.
# YORE: EOL 3.9: Replace `**_dataclass_opts` with `slots=True` within line.
@dataclass(eq=True, **_dataclass_opts)
class ExprConstant(Expr):
Expand Down

0 comments on commit d1b6c00

Please sign in to comment.