Skip to content

Commit

Permalink
loader: allow YAML templates with .yaml extension
Browse files Browse the repository at this point in the history
Oficially suggested extension for YAML files is .yaml. Accept it.

Link: https://yaml.org/faq.html
Fixes: #514
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  • Loading branch information
Rafał Miłecki authored and bosd committed Nov 2, 2023
1 parent edf3183 commit 18015ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/invoice2data/extract/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def read_templates(folder=None):
with codecs.open(
os.path.join(path, name), encoding="utf-8"
) as template_file:
if name.endswith(".yml"):
if name.endswith((".yaml", ".yml")):
try:
tpl = load(template_file.read(), Loader=SafeLoader)
except YAMLError as error:
Expand Down

0 comments on commit 18015ce

Please sign in to comment.