Skip to content

feat: allow explicit variable bound to be passed to Name#241

Merged
tlambert03 merged 3 commits intopyapp-kit:mainfrom
tlambert03:name-type-bound
Apr 29, 2025
Merged

feat: allow explicit variable bound to be passed to Name#241
tlambert03 merged 3 commits intopyapp-kit:mainfrom
tlambert03:name-type-bound

Conversation

@tlambert03
Copy link
Copy Markdown
Member

@tlambert03 tlambert03 commented Apr 28, 2025

this allows for directly providing the type to which a Name expression evaluates to:

from app_model.expressions import Name

is_running = Name("is_running", bound=bool)
reveal_type(is_running.eval())  # Revealed type is "builtins.bool"

also updates pre-commit

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (1ac9973) to head (dc8286b).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #241   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines         1914      1913    -1     
=========================================
- Hits          1914      1913    -1     

☔ 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.

@tlambert03
Copy link
Copy Markdown
Member Author

@jni or @Czaki ... do you guys know what might be going on with the failed napari test here? https://github.com/pyapp-kit/app-model/actions/runs/14710881217/job/41282696495?pr=241

@jni
Copy link
Copy Markdown

jni commented Apr 29, 2025

It's napari/napari-plugin-manager#151, sorry about that! Looks like a fix is incoming. (napari/napari-plugin-manager#152) 🙏

@jni
Copy link
Copy Markdown

jni commented Apr 29, 2025

(ie safe to ignore the failure, will be fixed separately)

@tlambert03 tlambert03 merged commit 166be68 into pyapp-kit:main Apr 29, 2025
34 of 35 checks passed
@tlambert03 tlambert03 deleted the name-type-bound branch April 29, 2025 21:05
@tlambert03 tlambert03 added the enhancement New feature or request label Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants