mdolab / pyspline

pySpline produces B-spline curves, surfaces, and volumes
Other
39 stars 26 forks source link

Adding Flake8 and Black formatting (take 2) #16

Closed bernardopacini closed 3 years ago

bernardopacini commented 3 years ago

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 package setup.py as well as docs conf.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.

bernardopacini commented 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).

ewu63 commented 3 years ago
bernardopacini commented 3 years ago