Code quality tools
For .py
files:
black
: Code formattingmypy
: Optional static type checkingisort
: Sorting imports sanelypylance
: Fast code quality checking in VSCodeFor Jupyter notebooks:
nbqa
: Run any file checker that would run on .py
files instead on .ipynb
notebooks.nbstripout
: Strip outputs from Jupyter notebooks to make them clean before committing.Data scientists should learn how to write good code
Data scientists are most commonly writing and developing custom code. It's the most flexible way to write all the abstractions that are needed. By writing custom code, we need some tools to help with code quality.