From 248aa632c0061f471b152dd68ef30797b9f976d4 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sat, 26 Feb 2022 16:56:13 -0500 Subject: [PATCH] Do not throw warning for beancount files with .beancount extension --- src/processor/ledger/beancount_to_jsonl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/processor/ledger/beancount_to_jsonl.py b/src/processor/ledger/beancount_to_jsonl.py index 1cac6b85..21dbcfb9 100644 --- a/src/processor/ledger/beancount_to_jsonl.py +++ b/src/processor/ledger/beancount_to_jsonl.py @@ -81,7 +81,10 @@ def get_beancount_files(beancount_files=None, beancount_file_filter=None, verbos all_beancount_files = absolute_beancount_files | filtered_beancount_files - files_with_non_beancount_extensions = {beancount_file for beancount_file in all_beancount_files if not beancount_file.endswith(".bean")} + files_with_non_beancount_extensions = {beancount_file + for beancount_file + in all_beancount_files + if not beancount_file.endswith(".bean") and not beancount_file.endswith(".beancount")} if any(files_with_non_beancount_extensions): print(f"[Warning] There maybe non beancount files in the input set: {files_with_non_beancount_extensions}")