Previously MExt used to raise a lot of resource warnings regarding unclosed files. This PR fixes it by switching from imp to importlib since the former is deprecated. I also made some other minor adjustments to the code to improve readability/code quality.
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (non-backwards-compatible fix or feature)
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Documentation update
[ ] Maintenance update
[ ] Other (please describe)
Testing
Code that runs IDwarp will not receive ResourceWarning anymore.
Checklist
Put an x in the boxes that apply.
[x] I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
[x] I have run unit and regression tests which pass locally with my changes
[ ] I have added new tests that prove my fix is effective or that my feature works
Purpose
Previously
MExt
used to raise a lot of resource warnings regarding unclosed files. This PR fixes it by switching fromimp
toimportlib
since the former is deprecated. I also made some other minor adjustments to the code to improve readability/code quality.Type of change
What types of change is it? Select the appropriate type(s) that describe this PR
Testing
Code that runs IDwarp will not receive
ResourceWarning
anymore.Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted