-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add comments to all py file #1649
Comments
Some of the functions already have a comment at the beginning of the function that looks like this:
Is that what you're looking for? |
I think it would be better if we add more description(comment) at the beginning of a py file to describe the function of a certain py file. Also, yes, the comment for each function needs to be added too, I found for some for functions, the comments are not updated. for some of functions they don't even have a comment @14rcole |
I see, I thought you meant that we needed function-level comments, I misread it. Along the same lines as the function, we should add type hinting to the functions as well |
@14rcole What are the advantages of type hinting ? |
It helps to document the code (you know what type of data the developer of the function expects for each variable) and it can be added to linting checks (throw warnings if the data passed to a function is not of the annotated type). It was originally added in 3.0 but expanded in 3.5. That said, the current LTS version of Python is 3.6 and very few people are using anything below that. Even CentOS 7 defaulta to 3.6.8 |
As per our discussion in the grooming session today, these comments should be function-level, not file-level |
Add more comment inside code especially init.py since this is kind of entry point of the entire LinchPin.
Add comment telling developer what each file does at the beginning of each file(.py)
The text was updated successfully, but these errors were encountered: