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

Format PatternMatchOr #6643

Closed
Tracked by #5834
MichaReiser opened this issue Aug 17, 2023 · 3 comments · Fixed by #6905
Closed
Tracked by #5834

Format PatternMatchOr #6643

MichaReiser opened this issue Aug 17, 2023 · 3 comments · Fixed by #6905
Assignees
Labels
formatter Related to the formatter help wanted Contributions especially welcome

Comments

@MichaReiser
Copy link
Member

MichaReiser commented Aug 17, 2023

Implement formatting of a | b patterns

match x:
    case [x] | (y):
        ...
@MichaReiser MichaReiser added formatter Related to the formatter help wanted Contributions especially welcome labels Aug 17, 2023
@MichaReiser MichaReiser added this to the Formatter: Alpha milestone Aug 22, 2023
@LaBatata101
Copy link
Contributor

I can take this

@charliermarsh
Copy link
Member

Nice, thanks @LaBatata101

@charliermarsh
Copy link
Member

You can maybe look at expression/expr_bool_op.rs as a reference, or the BinOpLayout::Default branch in expression/expr_bin_op.rs although that may have handling and special cases that we don't need here -- I'm not sure yet.

LaBatata101 added a commit to LaBatata101/ruff that referenced this issue Aug 26, 2023
MichaReiser pushed a commit to LaBatata101/ruff that referenced this issue Aug 28, 2023
MichaReiser pushed a commit to LaBatata101/ruff that referenced this issue Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter help wanted Contributions especially welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants