-
-
Notifications
You must be signed in to change notification settings - Fork 300
[fix] Crash when parsing an empty arbitrary expression with extract_node
#2736
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
[fix] Crash when parsing an empty arbitrary expression with extract_node
#2736
Conversation
__()
(the transient function without args)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If CI approves I approve as well :)
Do you understand the transient function though ? 😄 |
See b8dc84f It seems to be a very bespoke way to do extraction of nodes in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2736 +/- ##
=======================================
Coverage 93.21% 93.21%
=======================================
Files 93 93
Lines 11072 11072
=======================================
Hits 10321 10321
Misses 751 751
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Ha, thank you, here's the doc:
I'm going to update the changelog then. Learned something today. |
Don't we all when we look at |
__()
(the transient function without args)extract_node
extract_node
extract_node
…_node`` (#2736) (#2737) Closes #2734 (cherry picked from commit 59f36e7) Co-authored-by: Pierre Sassoulas <[email protected]>
* [fix] Crash when parsing an empty arbitrary expression with ``extract_node`` (#2736) (#2737) Closes #2734 (cherry picked from commit 59f36e7) Co-authored-by: Pierre Sassoulas <[email protected]> * [fix] Prevent crash on slice decorator for 'six' decorated function (#2738) (#2740) Closes #2721 (cherry picked from commit 555a128) Co-authored-by: Pierre Sassoulas <[email protected]> * [Backport maintenance/3.3.x] Initial fixes for Python 3.14 (#2747) (#2748) (cherry picked from commit 43111bb) * Improve backport job permissions (#2750) (cherry picked from commit fe5bb6c) * Use custom Github App to authenticate backport job (#2751) (#2752) (cherry picked from commit a6f8d6a) Co-authored-by: Marc Mueller <[email protected]> * Include subclasses of standard property classes as property decorators (#2735) * Include subclasses of standard property types as property decorators * Modify astroid.bases and tests.test_nodes to reflect that enum.property was added in Python 3.11, not 3.10 * Apply suggestions from code review Co-authored-by: Pierre Sassoulas <[email protected]> --------- Co-authored-by: Pierre Sassoulas <[email protected]> (cherry picked from commit 30128b7) * Bump astroid to 3.3.11, update changelog (#2777) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Marc Mueller <[email protected]> Co-authored-by: pylint-backport-bot[bot] <212256041+pylint-backport-bot[bot]@users.noreply.github.com> Co-authored-by: Mitch Harding <[email protected]>
Type of Changes
Description
To be fair I'm not exactly sure of what the transient function is. It seems internal. But the fix seems self evident.
astroid/astroid/builder.py
Lines 32 to 35 in 3636bc2
astroid/astroid/builder.py
Lines 303 to 315 in 3636bc2
astroid/astroid/builder.py
Lines 324 to 328 in 3636bc2
Closes #2734