@salmannotkhan kindly identified that we had imported and unused the sys library. This could have been automagically fixed prior to committing if we had been using code linting in a more automated workflow, e.g. using flake8 to follow PEP guidelines prior to commits. At the same time, we could also add code formatting with black, and make both runnable via nox, which we use for running tests in #9.
Changes Needed
Add flake8 and a range of sensible plugins, e.g. flake8-import-order, flake8-builtins, flake8-quotes, flake8-docstrings, and flake8-black. This requires adding flake8 as a --dev dependency via poetry.
Add and configure black for code formatting.
Add nox to run flake8 and black as it will be used for running tests.
Add pre-commit as a dev dependency and configure its TOML file accordingly to automate the above prior to a git commit.
See here and here for examples of implementing the above.
@salmannotkhan kindly identified that we had imported and unused the
sys
library. This could have been automagically fixed prior to committing if we had been using code linting in a more automated workflow, e.g. using flake8 to follow PEP guidelines prior to commits. At the same time, we could also add code formatting with black, and make both runnable via nox, which we use for running tests in #9.Changes Needed
flake8
and a range of sensible plugins, e.g.flake8-import-order
,flake8-builtins
,flake8-quotes
,flake8-docstrings
, andflake8-black
. This requires adding flake8 as a--dev
dependency via poetry.black
for code formatting.See here and here for examples of implementing the above.