HomeClusterLabs Projects

Refactor: python: Improve resourcerecover.py.

Description

Refactor: python: Improve resourcerecover.py.

  • Disable pylint warnings we can't really do anything about.
  • Simplify how the pats lists are built.
  • Get rid of the max attribute. It is unused.
  • 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.
  • Use a list comprehension instead of map(str.strip, lst). You're not really supposed to use map anymore, though I'm not sure why pylint isn't warning on this.
  • Get rid of unnecessary elif statements.

Details

Provenance
clumensAuthored on Jun 1 2023, 10:36 AM
Parents
rP9d5b91a95078: Refactor: python: Improve comments and whitespace in resourcerecover.py.
Branches
Unknown
Tags
Unknown