-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Short list of things to be cleaned up in this file. As discussed previously, keeping in some of these things and addressing them in the readme would also be good... perhaps having two (or more) versions of the file could be worth considering, like a "starter" file and a "solution" file or similar.
- updating the docstring formatting to be fully consistent with CSC148 (rough example below for the
Particleclass):
class Particle:
"""
An abstract class representing a particle.
Attributes:
- id: unique ID
- x: x-coordinate
- y: y-coordinate
- radius: radius
- colour: colour
- shape: shape
Representation Invariants:
- self.x >= 0
- self.y >= 0
- self.radius > 0
- self.shape in {'circle', 'square'}
"""
id: int
x: float
y: float
radius: int
colour: tuple[int, int, int]
shape: str- running python TA and fixing all style issues, such as ones mentioned below:
-
adding type annotations to all functions and methods; for
tuple, make sure to specify the types thetuplecontains (e.g.,tuple[float, float]for coordinates... or usingintif in units of pixels). -
adding docstrings to all functions and methods, with docstring examples as appropriate.
-
naming conventions with pothole case used for method names and CamelCase for class names.
-
80 character line length max.
-
Metadata
Metadata
Assignees
Labels
No labels