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

Infer returns from match cases #2042

Merged
merged 2 commits into from
Mar 3, 2023

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
✨ New feature

Description

Refs pylint-dev/pylint#5288

@@ -4998,6 +4998,7 @@ class Match(_base_nodes.Statement):
"""

_astroid_fields = ("subject", "cases")
_multi_line_block_fields = ("cases",)
Copy link
Member Author

@jacobtylerwalls jacobtylerwalls Mar 3, 2023

Choose a reason for hiding this comment

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

This allows MultiLineBlockNode._get_return_nodes_skip_functions() to do something useful.

@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Merging #2042 (dc1b709) into main (27352c2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2042   +/-   ##
=======================================
  Coverage   92.78%   92.78%           
=======================================
  Files          95       95           
  Lines       11007    11012    +5     
=======================================
+ Hits        10213    10218    +5     
  Misses        794      794           
Flag Coverage Δ
linux 92.55% <100.00%> (+<0.01%) ⬆️
pypy 88.52% <100.00%> (+0.01%) ⬆️
windows 92.34% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
astroid/nodes/node_classes.py 94.89% <100.00%> (+<0.01%) ⬆️
astroid/interpreter/_import/spec.py 97.40% <0.00%> (+0.05%) ⬆️

Provide argument to test fn

Co-authored-by: Pierre Sassoulas <[email protected]>
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants