Skip to content

Commit

Permalink
Enable whisker for python_patch
Browse files Browse the repository at this point in the history
Summary: We already use whisker for python, there is no reason to not use it for python_patch.

Reviewed By: thedavekwon

Differential Revision: D65916426

fbshipit-source-id: c8e7e440a0bd6063309711e3114e49ac2b6bf4ad
  • Loading branch information
TJ Yin authored and facebook-github-bot committed Nov 14, 2024
1 parent 19fc705 commit 3af78c4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,15 @@ class t_python_patch_generator : public t_mstch_generator {
public:
using t_mstch_generator::t_mstch_generator;

std::optional<whisker_options> use_whisker() const override {
whisker_options opts;
opts.allowed_undefined_variables = {
"field:has_adapter?",
"field:type",
};
return opts;
}

std::string template_prefix() const override { return "python"; }

void generate_program() override {
Expand Down

0 comments on commit 3af78c4

Please sign in to comment.