FogROS2 icon indicating copy to clipboard operation
FogROS2 copied to clipboard

Python style and best practices

Open mjd3 opened this issue 2 years ago • 1 comments

  • [ ] Use python properties instead of get_x functions
    • We have a lot of functions in aws.py that use get_x (and corresponding calls to y.get_x()) for attributes that should be properties of the class. These should be changed to use the @property decorator and @x.setter (if not readonly).
  • [ ] All internal variables should be prefixed with _ (as in, self._x).
  • [ ] Abstract base classes should have separate files from their derived classes (e.g., AWS implementation of CloudInstance)
  • [ ] Replace string concatenations using + with f-strings
  • [ ] Replace print with logging where possible

mjd3 avatar May 12 '22 01:05 mjd3

Check for Python Style guide/ checker

SimeonOA avatar May 12 '22 18:05 SimeonOA