diff --git a/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py b/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py index c1783f8651d592..502c4ed187b85f 100644 --- a/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py +++ b/scripts/py_matter_idl/examples/matter_idl_plugin/__init__.py @@ -199,13 +199,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): Inintialization is specific for java generation and will add filters as required by the java .jinja templates to function. """ - super().__init__(storage, idl) - - # Override the template path to use local templates within this plugin directory - self.jinja_env = jinja2.Environment( - loader=jinja2.FileSystemLoader( - searchpath=os.path.dirname(__file__)), - keep_trailing_newline=True) + super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) # String helpers self.jinja_env.filters['toLowerSnakeCase'] = toLowerSnakeCase @@ -241,7 +235,7 @@ def internal_render_all(self): # Header containing a macro to initialize all cluster plugins self.internal_render_one_output( - template_path="./matter_cluster_proto.jinja", + template_path="matter_cluster_proto.jinja", output_file_name=filename, vars={ 'cluster': cluster,