-
Notifications
You must be signed in to change notification settings - Fork 1
Use pythons docstrings #6
Copy link
Copy link
Open
Description
I would recommend to use pythons docstring format for modules, classes and methods to improve the documentation quality.
Using docstrings will provide clear and structured comments for classes, methods, and modules, making the codebase easier to understand and maintain. Another benefit is, that most IDEs can automatically extract and display docstrings, improving the developer experience.
For example the following method of the manager.py module:
def delete_task(self, i: int):
"""Delete a task from the tasklist."""
if 0 <= i < len(self.tasklist):
self.tasklist.drop(i, inplace=True)
self.tasklist = self.tasklist.reset_index(drop=True)
self.tasklist.to_csv(self.file_path, index=False)
else:
print("Index out of range.")will be documented as follows:
def delete_task(self, i: int):
"""
Delete a task from the tasklist.
:param i: The index of the task to delete
"""
.....Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels