kedder / ofxstatement

Tool to convert proprietary bank statement to OFX format, suitable for importing to GnuCash or other personal finance applications.
GNU General Public License v3.0
270 stars 61 forks source link

Fix plugin loading #274

Closed edwagner closed 4 months ago

edwagner commented 4 months ago

After the switch to importlib, plugins are retrieved by name, not integer index. For details see importlib.metadata.EntryPoints.getitem()

I discovered this when trying to run ofxstatement with my plugin and I got an error like:

.../importlib_metadata/__init__.py", line 269, in __getitem__
    raise KeyError(name)
KeyError: 0

I also had to make a tweak to the plugin test to make the mock more in line with importlib.

coveralls commented 4 months ago

Coverage Status

coverage: 96.05% (+0.02%) from 96.033% when pulling c659d45eefa60ddfb3ae8d61c0d9f0f1f0473d0e on edwagner:fix-plugin-loading into 15f8c23b77bbca6471fd12415b39256df7380d95 on kedder:master.