Skip to content

Fix parameter names in docstrings - #2118

Merged
adam-urbanczyk merged 2 commits into
CadQuery:masterfrom
mmporong:fix-docstring-param-names
Nov 16, 2026
Merged

adam-urbanczyk merged 2 commits into
CadQuery:masterfrom
mmporong:fix-docstring-param-names

Conversation

@mmporong

Copy link
Copy Markdown
Contributor

Some docstrings document parameters under names the functions do not use, so passing them by the documented name fails. I found these by comparing the :param fields with the function signatures:

  • Workplane (class docstring): plane → inPlane
  • Workplane.translate: tupleDistance → vec (also in :type)
  • Workplane.each: callBackFunction → callback (also in the description)
  • Workplane.twistExtrude: angle → angleDegrees
  • Workplane.sweep: multiSection → multisection
  • Mixin1D.curvatures: d → ds
  • DxfDocument.add_shape: s → shape
  • Mixin1D.paramsLength: removed :param pts:; the method only takes locations, which is already documented.

Docstring-only change.

Workplane (inPlane), Workplane.translate (vec), Workplane.each (callback), Workplane.twistExtrude (angleDegrees), Workplane.sweep (multisection), Mixin1D.curvatures (ds) and DxfDocument.add_shape (shape) documented their parameters under old names, and Mixin1D.paramsLength also documented a pts parameter it does not take.
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.81%. Comparing base (8178185) to head (c3cc675).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2118   +/-   ##
=======================================
  Coverage   95.81%   95.81%           
=======================================
  Files          30       30           
  Lines        9605     9614    +9     
  Branches     1443     1447    +4     
=======================================
+ Hits         9203     9212    +9     
  Misses        247      247           
  Partials      155      155           

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

Small tweaks

Comment thread cadquery/cq.py Resolved
Comment thread cadquery/cq.py Resolved
@adam-urbanczyk

Copy link
Copy Markdown
Member

Thanks @mmporong . Doc tweak, merging without additional reviews.

@adam-urbanczyk
adam-urbanczyk merged commit aa9f0d7 into CadQuery:master Nov 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants