Skip to content

IDAES v2 code cleanup

Andrew Lee edited this page Mar 28, 2022 · 9 revisions

Checklist

  • Run Black
  • Run pylint

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

Commits with black

  • bdf074f41a07efbe13559d1a7b6c629d3e1971b0 (PR #759)
  • 5ff6a842d8550e31b3a13f797f8a1680eba81fdb (PR #766)
  • 6b9181244449d41adb3266ece9cc88ab5f858b1a (PR #773)
  • 8300c28d8b70d1cc4517b32cc4c79b96bf355b2b (PR #773)

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