Skip to content

Commit d1b6c00

Browse files
committed
chore: Add note about ExprConstant not being used
1 parent 3684cd6 commit d1b6c00

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/_griffe/expressions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ def iterate(self, *, flat: bool = True) -> Iterator[str | Expr]:
317317
yield from _join(self.conditions, " if ", flat=flat)
318318

319319

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

0 commit comments

Comments
 (0)