Closed bernardopacini closed 3 years ago
For the first bullet, the import test only checks if the module can be imported, so it is entirely unused after being imported (intentionally). If I remove the import (as requested by Flake8) then this script would be useless and not actually check anything. I may be misunderstanding the purpose of this file so please correct me if I'm wrong. I'll go ahead and fix the setup.py
, thank you for the heads up with that change.
For the second bullet, I double checked my black installation and it is up to date. This discrepancy may be caused by the fact that I'm running Python 3.9 on my machine, so I'll change that and make sure I'm checking for 3.7 - 3.8 instead (as Travis does).
# noqa
which tells flake8 to ignore this error.5 files reformatted
so something is going on. Maybe we can debug this offline.Got it, I missed that feature so I'll update that. Thank you for the clarification
Very strange. I'll take a look and see why I am getting the wrong behavior on my machine. Thanks for double checking on yours, sorry for the added hassle!
Purpose
Adding Flake8 and Black formatting to all Python files in the repo (mdolab/private-docs#191). This includes the
examples/
,pyspline/
,src/f2py/
,tests/reg_tests/
directories and packagesetup.py
as well as docsconf.py
files.Black and Flake8 disagree on how to format the
setup.py
file and here we stick with Black formatting.Type of change
What types of change is it? Select the appropriate type(s) that describe this PR
Testing
No additional tests besides the already defined regression tests.
Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted