Skip to content

Experimental _get and _get_one typing - #2060

Merged
jmwright merged 7 commits into
masterfrom
adam-_get-typing
Aug 11, 2026
Merged

Experimental _get and _get_one typing#2060
jmwright merged 7 commits into
masterfrom
adam-_get-typing

Conversation

@adam-urbanczyk

@adam-urbanczyk adam-urbanczyk commented Jul 6, 2026

Copy link
Copy Markdown
Member

Gets rid of the mypy plugin. Max arity of _get and _get_one is hardcoded, but in practice this should not be a problem.

This will possibly enable users of type-checkers other than mypy to use CQ without workarounds.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.72%. Comparing base (f4847b5) to head (5c4e7a4).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2060      +/-   ##
==========================================
+ Coverage   95.70%   95.72%   +0.01%     
==========================================
  Files          30       30              
  Lines        9480     9533      +53     
  Branches     1410     1420      +10     
==========================================
+ Hits         9073     9125      +52     
  Misses        253      253              
- Partials      154      155       +1     

☔ View full report in Codecov by Harness.
📢 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.

@adam-urbanczyk

Copy link
Copy Markdown
Member Author

@DavidMStraub could check if this actually works for you?

@DavidMStraub

Copy link
Copy Markdown
Contributor

Sorry for the delay!

After our discussion, I think the changes are mostly shielded from the user-facing side, but I still think it would be great to get rid of the mypy plugin and make the code base more agnostic of the specific type checker, given modern alternatives like pyright, pyrefly or ty are on the rise.

@adam-urbanczyk
adam-urbanczyk marked this pull request as ready for review August 8, 2026 09:42
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Comment thread cadquery/occ_impl/shapes.py Outdated
Fix param naming

Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>

@lorenzncode lorenzncode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @adam-urbanczyk !

@jmwright

Copy link
Copy Markdown
Member

Is the coverage error not a problem?

@adam-urbanczyk

Copy link
Copy Markdown
Member Author

The coverage of this two lines did not change in this PR (i.e. it is a false positive). But fair enough, I extended the tests to get to 100%.

@jmwright

Copy link
Copy Markdown
Member

Thanks @adam-urbanczyk

@jmwright
jmwright merged commit 1bd6b9a into master Aug 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants