pysal / submodule_template

This provides a template for submodules to use in the PySAL project
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Add pre-commit for formatting & linting #36

Closed jGaboardi closed 1 year ago

jGaboardi commented 1 year ago

We could add in a .pre-commit-config.yml and setup.cfg for automated code formatting and linting. Also, add black, isort, flake8, and pyflakes to requirements, etc.

See an example of all pieces in mapclassify

knaaptime commented 1 year ago

+1

martinfleis commented 1 year ago

What pyflakes do?

jGaboardi commented 1 year ago

I had thought that flake8 and pyflakes were needed for linting. Though maybe I'm mistaken?

martinfleis commented 1 year ago

Only flake8 as far as I know.

If you like Pyflakes but also want stylistic checks, you want flake8, which combines Pyflakes with style checks against PEP 8 and adds per-project configuration ability.

(https://pypi.org/project/pyflakes/)

jGaboardi commented 1 year ago

Well, then. I stand corrected.