Closed larsoner closed 3 months ago
Right, thanks for the fix! In which case(s) could we expect the code in the try-block to raise an exception?
No idea I think it's just a safety thing. import edfio
failing because some metadata is messed up in .dist-info
(or whatever other errors the version inspection might trigger!) seems like less good behavior than import edfio
working but the version being reported as 0.0.0
Makes sense, it e.g. fails if the package is just imported locally but not installed. To make the test job happy, could you please add a # pragma: no cover
to the except Exception:
line and replace exclude_lines
with exclude_also
in pyproject.toml
?
Done in https://github.com/the-siesta-group/edfio/pull/46/commits/313a24de29225ce1064d23595e01c382784a2782 (not 100% sure if you wanted me to add anything to exclude_also
or not -- wasn't sure if the pragma
was enough)
Perfect as-is, thanks @larsoner!
On latest
main
I just did:So I don't think this is yet working as intended even with #44. After the changes in this PR (which follow what MNE-Python does to get the version) I get: