Skip to content

Support dict unpacking with conditional expression#199

Merged
gordonwatts merged 6 commits intomasterfrom
codex/add-syntactic-sugar-for-dictionary-selection
Jul 5, 2025
Merged

Support dict unpacking with conditional expression#199
gordonwatts merged 6 commits intomasterfrom
codex/add-syntactic-sugar-for-dictionary-selection

Conversation

@gordonwatts
Copy link
Member

@gordonwatts gordonwatts commented Jul 5, 2025

Summary

  • handle **dict expansion in syntatic_sugar.resolve_syntatic_sugar
  • allow conditional dictionary unpacking by converting to IfExp
  • test unpacking and conditional expansions
  • Updated the agents file to include black and flake8
  • Make sure nested expansions work properly

Fixes #193


https://chatgpt.com/codex/tasks/task_e_686871ce28888320aae6af67d4f2adf4

@gordonwatts gordonwatts self-assigned this Jul 5, 2025
@gordonwatts gordonwatts added the enhancement New feature or request label Jul 5, 2025
@gordonwatts gordonwatts force-pushed the codex/add-syntactic-sugar-for-dictionary-selection branch from f675b3a to f485ec1 Compare July 5, 2025 17:06
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 97.39%. Comparing base (2606c3c) to head (f67a611).

Files with missing lines Patch % Lines
func_adl/ast/syntatic_sugar.py 92.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
- Coverage   97.48%   97.39%   -0.10%     
==========================================
  Files          15       15              
  Lines        1433     1459      +26     
==========================================
+ Hits         1397     1421      +24     
- Misses         36       38       +2     
Flag Coverage Δ
unittests 97.39% <92.30%> (-0.10%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gordonwatts gordonwatts merged commit 679c45d into master Jul 5, 2025
16 checks passed
@gordonwatts gordonwatts deleted the codex/add-syntactic-sugar-for-dictionary-selection branch July 5, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Const if expr resolution - can we make this work in func_adl?

2 participants