Skip to content
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

Improve format of comments in main.py #7

Closed
angelofallars opened this issue Sep 2, 2021 · 0 comments · Fixed by #13
Closed

Improve format of comments in main.py #7

angelofallars opened this issue Sep 2, 2021 · 0 comments · Fixed by #13
Assignees

Comments

@angelofallars
Copy link
Collaborator

angelofallars commented Sep 2, 2021

Formatting of comments

Assigned to: @izayaaaaaaa

According to rule E265 from the Flake8 Python rules:

Block comment should start with '# ' (E265)
Block comments should have one space before the pound sign (#) and the comment itself.

Anti-pattern
#This comment needs a space
def print_name(self):
print(self.name)

Best practice
# Comment is correct now
def print_name(self):
print(self.name)

This means there should be one space between the hashtag sign (#) and the actual comment.

In main.py however, there is no spacing between the hashtag (#) and the content in the comments.

Current code:
#sets the values to 0
Correct code:
# sets the values to 0

Specifications

Edit main.py and correct the comment formatting.

  1. Go to main.py.
  2. Click the pencil or edit button at the top right of the code block.
  3. Make changes to all of the comments. Add a space between the # and the first word.
  4. When done, scroll below and select Create a new branch for this commit and start a pull request..
  5. Select Propose changes to open a pull request.
  6. Set the title of the pull request into an appropriate one like Fix comment formatting.
  7. Put in the description Fixes #7 to automatically close this issue once it's merged.
  8. Click Create Pull Request.

Once you've created the pull request, I'll review it.

If you have any questions, feel free to ask me here or on Discord.

@ryanamay ryanamay linked a pull request Sep 3, 2021 that will close this issue
ryanamay pushed a commit that referenced this issue Sep 3, 2021
Optimization with a couple of fixes.
This merge fixes issues: #7 #10, and #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants