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

Formatter: Match (includes MatchCase and Patterns) #5834

Closed
12 tasks done
Tracked by #4798 ...
konstin opened this issue Jul 17, 2023 · 7 comments
Closed
12 tasks done
Tracked by #4798 ...

Formatter: Match (includes MatchCase and Patterns) #5834

konstin opened this issue Jul 17, 2023 · 7 comments
Labels
formatter Related to the formatter good first issue Good for newcomers help wanted Contributions especially welcome

Comments

@konstin
Copy link
Member

konstin commented Jul 17, 2023

This is a bigger project that includes the following nodes:

The match arms have the same considerations for comments as if branches or try-except branches.

@charliermarsh charliermarsh added the formatter Related to the formatter label Jul 19, 2023
@MichaReiser MichaReiser added this to the Formatter: Alpha milestone Jul 31, 2023
@MichaReiser MichaReiser added the help wanted Contributions especially welcome label Jul 31, 2023
@MichaReiser
Copy link
Member

As a note. The idea isn't that this is all implemented in a single PR. I recommend to start implementing StmtMatch and stubbing out the match cases (if they aren't already). We can then add support for the match statements one by one

@dhruvmanila
Copy link
Member

Regarding the match patterns, I would say that PatternMatchValue, PatternMatchSingleton, PatternMatchStar, PatternMatchSequence (sequence of other patterns), and PatternMatchOr (similar to PatternMatchSequence) are good first issues and could be taken on in the order mentioned.

@konstin konstin added the good first issue Good for newcomers label Aug 14, 2023
@evanrittenhouse
Copy link
Contributor

I can take those pattern issues! Feel free to assign them to me

@MichaReiser
Copy link
Member

MichaReiser commented Aug 14, 2023

I can take those pattern issues! Feel free to assign them to me

Awesome. Let's start with one to leave an opportunity for other contributors too. Can you pick one and comment on the issue so that I can assign it to you?

@MichaReiser
Copy link
Member

I don't think this is ready yet. We first need to land #6594 (@evanrittenhouse you can work on top of that PR, as long as you don't mind that there's one failing test).

LaBatata101 added a commit to LaBatata101/ruff that referenced this issue Aug 24, 2023
@cnpryer
Copy link
Contributor

cnpryer commented Sep 1, 2023

Is #6933 still required for the Alpha release? Looks like it’s marked as Beta.

@charliermarsh
Copy link
Member

My impression is that #6933 shouldn't be blocking for alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter good first issue Good for newcomers help wanted Contributions especially welcome
Projects
None yet
Development

No branches or pull requests

6 participants