Style and Linting

Linting

DASCore uses Black and flake8 for code linting. If you have properly installed DASCore’ pre-commit hooks they will be invoked automatically when you make a git commit. If any complaints are raised simply address them and try again.

Alternatively, before making a commit, you can run all the hooks on all the code like so:

pre-commit run --all

It is often useful to run this command twice before making changes because many of the hooks will automatically fix the issue they raise on the first run.

Type Hints

DASCore makes extensive use of Python 3’s type hints. Use them to annotate any public functions/methods. See the docstring section of the documentation page for more information and some examples.