From 5de162e838fc36260a67ec2a90948d97cf527295 Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Sun, 16 May 2021 21:26:32 -0600 Subject: [PATCH] black-ify code --- .github/workflows/testing_external_plugins.yaml | 2 +- features/steps/export_steps.py | 6 ++---- jrnl/plugins/collector.py | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing_external_plugins.yaml b/.github/workflows/testing_external_plugins.yaml index 0869c182..ae529dfb 100644 --- a/.github/workflows/testing_external_plugins.yaml +++ b/.github/workflows/testing_external_plugins.yaml @@ -52,8 +52,8 @@ jobs: poetry install --remove-untracked poetry install poetry run python -m pip install ./tests/external_plugins_src/ - cd .. poetry shell + cd .. # installed test plugins aren't recognized by "behave" if run from the # project's root folder, but "poetry run" doesn't work on folders upstream # from project root diff --git a/features/steps/export_steps.py b/features/steps/export_steps.py index ffc54671..d52e8b4d 100644 --- a/features/steps/export_steps.py +++ b/features/steps/export_steps.py @@ -89,14 +89,12 @@ def entry_array_count(context, entry_number, name, items_number): assert len(out_json["entries"][entry_number - 1][name]) == items_number -@then( - 'entry {entry_number:d} should not have an array "{name}"' -) +@then('entry {entry_number:d} should not have an array "{name}"') def entry_not_array_item(context, entry_number, name): # note that entry_number is 1-indexed. out = context.stdout_capture.getvalue() out_json = json.loads(out) - assert (name not in out_json["entries"][entry_number - 1]) + assert name not in out_json["entries"][entry_number - 1] @then("the output should be a valid XML string") diff --git a/jrnl/plugins/collector.py b/jrnl/plugins/collector.py index 21527ec3..c848c508 100644 --- a/jrnl/plugins/collector.py +++ b/jrnl/plugins/collector.py @@ -95,6 +95,7 @@ def get_exporter(format): except (AttributeError, KeyError): return None + def get_importer(format): """ Given an import format, returns the (callable) class of the corresponding importer.