Skip to content

Load only python files from plugins-dir.#890

Merged
simonw merged 2 commits intosimonw:masterfrom
amjith:master
Jul 3, 2020
Merged

Load only python files from plugins-dir.#890
simonw merged 2 commits intosimonw:masterfrom
amjith:master

Conversation

@amjith
Copy link
Contributor

@amjith amjith commented Jul 3, 2020

The current behavior for --plugins-dir is to load every file in that folder as a python module. This can result in errors if there are non-python files in the plugins dir (such as .mypy_cache).

This PR restricts the module loading to only python files.

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #890 into master will decrease coverage by 0.01%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #890      +/-   ##
==========================================
- Coverage   83.42%   83.40%   -0.02%     
==========================================
  Files          27       27              
  Lines        3632     3634       +2     
==========================================
+ Hits         3030     3031       +1     
- Misses        602      603       +1     
Impacted Files Coverage Δ
datasette/app.py 95.99% <80.00%> (-0.17%) ⬇️

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 57879dc...745af3b. Read the comment docs.

@simonw
Copy link
Owner

simonw commented Jul 3, 2020

This is an excellent fix. Thanks!

Not sure why codecov is complaining. I'm going to merge it as-is.

@simonw simonw merged commit ea99a44 into simonw:master Jul 3, 2020
simonw added a commit that referenced this pull request Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants