From fd8519f221fd2b0e92c1803922e6ebc764fff002 Mon Sep 17 00:00:00 2001 From: William Davies <36384318+william-davies@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:50:39 +0000 Subject: [PATCH] fix: typo in Python module name in module docstring (#6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I might be mistaken, but I think that the `-` has to be `_` for the import to work. Here is my testing: ``` [I] ⋊> ~/my-beancount on mainline ⨯ python (beancount) 22:30:18 Python 3.11.5 (main, Sep 11 2023, 08:19:27) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.import_module('fava_plugins.split_income') >>> importlib.import_module('fava-plugins.split_income') Traceback (most recent call last): File "", line 1, in File "/Users/williamdavies/opt/miniconda3/envs/beancount/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1126, in _find_and_load_unlocked File "", line 241, in _call_with_frames_removed File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1140, in _find_and_load_unlocked ModuleNotFoundError: No module named 'fava-plugins' >>> importlib.import_module('fava-plugins') Traceback (most recent call last): File "", line 1, in File "/Users/williamdavies/opt/miniconda3/envs/beancount/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1140, in _find_and_load_unlocked ModuleNotFoundError: No module named 'fava-plugins' >>> importlib.import_module('fava_plugins') ``` Please do let me know if I'm wrong! Otherwise, updating the docstring will help others avoid the head-scratching I just did :) --- fava_plugins/split_income.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fava_plugins/split_income.py b/fava_plugins/split_income.py index 80fa5a1..2a892d1 100644 --- a/fava_plugins/split_income.py +++ b/fava_plugins/split_income.py @@ -5,7 +5,7 @@ them out, leaving you only with your net income. The plugin can be configured as follows: - plugin "fava-plugins.split_income" "{ + plugin "fava_plugins.split_income" "{ 'income': 'Income:Work', 'net_income': 'Income:Net', 'taxes': 'Expenses:Taxes',