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

Docs: style: multiline brackets #3143

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Conversation

beauxq
Copy link
Collaborator

@beauxq beauxq commented Apr 14, 2024

What is this fixing or adding?

This can be debated/disagreed with - it's just something I thought of when I saw an inconsistency within a single PR.

This is compatible with PEP8

But PEP8 also allows other things, like:

stuff = {
    x: y
    for x, y in thing
    if y > 2}

and

stuff = {
    x: y
    for x, y in thing
    if y > 2
    }

Note that this only applies to when the open bracket is at the end of a line.
So this is still ok:

stuff = {x: y
         for x, y in thing
         if y > 2}

How was this tested?

sometimes

@github-actions github-actions bot added is: documentation Improvements or additions to documentation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 14, 2024
@black-sliver
Copy link
Member

Hm, there have been expressions/comprehensions/generators where the first counter example looks better to me, but generally speaking I agree that

{
    ...
}

is the nicest syntax when you span more than 3-ish lines

@Exempt-Medic Exempt-Medic added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 19, 2024
@ThePhar ThePhar merged commit a50e68a into ArchipelagoMW:main Apr 21, 2024
3 checks passed
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: documentation Improvements or additions to documentation. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants