Skip to content

Commit

Permalink
todos for linting step calls in decorator wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
DropD committed Apr 19, 2024
1 parent fba07f1 commit 50bdea2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gt4py/next/ffront/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def past_stage(self):
return self.backend.transforms_prog.func_to_past(self.definition_stage)
return next_backend.DEFAULT_PROG_TRANSFORMS.func_to_past(self.definition_stage)

# TODO(ricoh): linting should become optional, up to the backend.
def __post_init__(self):
if self.backend is not None and self.backend.transforms_prog is not None:
self.backend.transforms_prog.past_lint(self.past_stage)
Expand Down Expand Up @@ -224,6 +225,7 @@ def __call__(self, *args, offset_provider: dict[str, Dimension], **kwargs):
ppi.ensure_processor_kind(self.backend.executor, ppi.ProgramExecutor)
self.backend(self.past_stage, *args, **(kwargs | {"offset_provider": offset_provider}))

# TODO(ricoh): linting should become optional, up to the backend.
def __post_init__(self):
if self.backend is not None and self.backend.transforms_prog is not None:
self.backend.transforms_prog.past_lint(self.past_stage)
Expand Down Expand Up @@ -399,6 +401,7 @@ def from_function(
backend=backend,
)

# TODO(ricoh): linting should become optional, up to the backend.
def __post_init__(self):
"""This ensures that DSL linting occurs at decoration time."""
_ = self.foast_stage
Expand Down

0 comments on commit 50bdea2

Please sign in to comment.