CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
2.93k stars 276 forks source link

Read global element variable at creation time of the promise,… #1566

Closed kalanzun closed 2 months ago

kalanzun commented 2 months ago

…not during resolve.

At resolve time, the global variable might already have changed.

Fix #1565

kalanzun commented 2 months ago

I did not add a test. To actually test it, we would need to add jupyter lab and playwright to the dev environment. That might not be worth it?

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.54%. Comparing base (99792e5) to head (44438d6). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1566 +/- ## ======================================= Coverage 94.54% 94.54% ======================================= Files 28 28 Lines 5848 5848 Branches 1166 1166 ======================================= Hits 5529 5529 Misses 193 193 Partials 126 126 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jmwright commented 2 months ago

Looks good. Thanks @kalanzun and @adam-urbanczyk