Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: Also catch ModuleNotFoundErrors for formatters #6212

Merged
merged 1 commit into from
Nov 19, 2021
Merged

Conversation

adswa
Copy link
Member

@adswa adswa commented Nov 18, 2021

A quick fix for #6210.

@adswa adswa added the semver-internal Changes only affect the internal API label Nov 18, 2021
@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #6212 (0c9766d) into master (6ef756e) will decrease coverage by 15.49%.
The diff coverage is 50.00%.

❗ Current head 0c9766d differs from pull request most recent head e88d604. Consider uploading reports for the commit e88d604 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #6212       +/-   ##
===========================================
- Coverage   89.71%   74.22%   -15.50%     
===========================================
  Files         320      320               
  Lines       41724    41706       -18     
===========================================
- Hits        37433    30956     -6477     
- Misses       4291    10750     +6459     
Impacted Files Coverage Δ
datalad/cmdline/tests/test_formatters.py 12.50% <50.00%> (-2.50%) ⬇️
datalad/version.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/wtf.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/addurls.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/interface/clean.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/no_annex.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/interface/unlock.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/distribution/drop.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/plugin/add_readme.py 0.00% <0.00%> (-100.00%) ⬇️
... and 137 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ef756e...e88d604. Read the comment docs.

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I would suggest a different approach for more homogeneity with other cases like this, though.

datalad/cmdline/tests/test_formatters.py Outdated Show resolved Hide resolved
These tests started to fail when the prev. try except clause only
checked for ImportErrors but ModuleNotFound errors where raised.
This should handle an unavailable formatters library more gracefully
and generally.
Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

@mih mih merged commit e6e7720 into datalad:master Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.10/Windows: Formatters throws uncaught ModuleNotFoundError
2 participants