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

Add a test case for too-complex in match case, for discussion #9667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix
βœ“ πŸ“œ Docs

Description

See astral-sh/ruff#11421 for initial reasoning behind this. I think we should modify the way we compute match case. But not sure if we should add a new visit method in pylint or add a get_children method for match case in astroid so we ends up not having to modify anything on the pylint side (and would benefit from it elsewhere too ?).

@Pierre-Sassoulas Pierre-Sassoulas added Discussion πŸ€” Needs specification πŸ” Accepted as a potential improvement, and needs to specify edge cases, message names, etc. labels May 22, 2024
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 1096f19

@cdce8p
Copy link
Member

cdce8p commented Jun 8, 2024

But not sure if we should add a new visit method in pylint or add a get_children method for match case in astroid so we ends up not having to modify anything on the pylint side (and would benefit from it elsewhere too ?).

get_children should already work same as visitMatchCase. I haven't looked into the mccabe extension yet, so not sure I can really help with that at this point.

@cdce8p cdce8p removed their request for review June 8, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion πŸ€” Needs specification πŸ” Accepted as a potential improvement, and needs to specify edge cases, message names, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants