Skip to content

IDAES v2 code cleanup

Ludovico Bianchi edited this page Mar 18, 2022 · 9 revisions

Code formatting

Black

  • Make sure a stable release of Black is used
  • Run Black with default options (we can bikeshed on the line length later)
python -m pip install black=22.1.0
black path/to/dir

pylint

  • pylint should be installed already as part of requirements-dev.txt
  • pylint behavior can change dramatically between even micro releases of pylint and astroid (the underlying package used by pylint to parse Python syntax), so it's important that the supported version is the same (requirements-dev.txt specifies the right versions)
pylint --rcfile=./.pylint/pylintrc --disable=W,C,R,I --output-format=idaes_reporters.MultiReporter path/to/dir
Clone this wiki locally