Skip to content

Modifed Coding-style-guide.md#474

Merged
seanlip merged 4 commits intooppia:developfrom
Helper2020:black-formatter-doc
Nov 5, 2025
Merged

Modifed Coding-style-guide.md#474
seanlip merged 4 commits intooppia:developfrom
Helper2020:black-formatter-doc

Conversation

@Helper2020
Copy link
Collaborator

No description provided.

@Helper2020 Helper2020 marked this pull request as ready for review October 13, 2025 18:31
@Helper2020
Copy link
Collaborator Author

Helper2020 commented Oct 13, 2025

@seanlip PTAL @jayam04 PTAL

@seanlip
Copy link
Member

seanlip commented Oct 19, 2025

@Helper2020 Adding my comments from chat:

  • Use backticks (`) for code snippets. Search for "markdown backticks" or similar for info.
  • Please check the backend code style guidance that is already on the page and drop anything that does not match black's style.

@Helper2020
Copy link
Collaborator Author

Helper2020 commented Oct 20, 2025

@seanlip Sorry, I forgot to push the last commit.

@Helper2020 Adding my comments from chat:

  • Use backticks (`) for code snippets. Search for "markdown backticks" or similar for info.
  • Please check the backend code style guidance that is already on the page and drop anything that does not match black's style.

Copy link
Member

@jayam04 jayam04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jayam04
Copy link
Member

jayam04 commented Oct 22, 2025

@seanlip I didn't saw you are reviewing.

I added LGTM, but it requires you review, so I am not adding blocking review again.

@Helper2020 please ensure it's approved by @seanlip before merging.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Helper2020 -- just a couple of comments, PTAL.


## Python

#### Black
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the section that talks about Black (basically, all the new stuff) just above the section that talks about Prettier, and give it the same level of heading. We should be consistent in how we describe the formatters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

'def',
None)
- **Indentation inside parentheses:**
Let [Black](https://black.readthedocs.io/en/stable/) handle indentation and line breaks automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the Black hyperlink link to the section of this wiki page that discusses Black, instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator Author

@Helper2020 Helper2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanlip PTAL


## Python

#### Black
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

'def',
None)
- **Indentation inside parentheses:**
Let [Black](https://black.readthedocs.io/en/stable/) handle indentation and line breaks automatically.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Helper2020 Just a couple more suggested changes, then it looks good to merge. Thanks!

Comment on lines 26 to 28
- **Indentation inside parentheses:**
Let [Black](#black) handle indentation and line breaks automatically.
Do **not** manually align to the opening parenthesis or indent by a fixed number of spaces.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Indentation inside parentheses:**
Let [Black](#black) handle indentation and line breaks automatically.
Do **not** manually align to the opening parenthesis or indent by a fixed number of spaces.
- Indentation inside parentheses: Let [Black](#black) handle indentation and line breaks automatically. Do **not** manually align to the opening parenthesis or indent by a fixed number of spaces.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 128 to 130
- **Manual formatting:** You can format a specific file manually using:
```bash
black /home/dev/opensource/oppia/core/controllers/android.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Manual formatting:** You can format a specific file manually using:
```bash
black /home/dev/opensource/oppia/core/controllers/android.py
- **Manual formatting:** You can format a specific file manually using `black {{filepath}}`. For example, to format android.py, you would run:
```bash
black /home/dev/opensource/oppia/core/controllers/android.py

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanlip PTAL

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Helper2020 !

@seanlip seanlip merged commit 853c72d into oppia:develop Nov 5, 2025
3 checks passed
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 this pull request may close these issues.

3 participants