HomeClusterLabs Projects

Refactor: python: Improve componentfail.py.

Description

Refactor: python: Improve componentfail.py.

  • Disable pylint warnings we can't really do anything about.
  • Simplify how the patterns lists are built. In one spot, use copy() to make it more obvious what is happening in the code.
  • Rename most attributes to use a leading underscore, since they are private.
  • Rename all methods to be private and follow python naming conventions.
  • Use %r instead of repr in format strings.
  • Get rid of unnecessary elif statements.

Details

Provenance
clumensAuthored on Jun 1 2023, 11:01 AM
Parents
rP5958d48c32d5: Refactor: python: Improve comments and whitespace in componentfail.py.
Branches
Unknown
Tags
Unknown