Skip to content

Fix parameter names in docstrings - #2118

Open
mmporong wants to merge 1 commit into
CadQuery:masterfrom
mmporong:fix-docstring-param-names
Open

mmporong wants to merge 1 commit into
CadQuery:masterfrom
mmporong:fix-docstring-param-names

Conversation

@mmporong

Copy link
Copy Markdown

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 (04059e4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2118   +/-   ##
=======================================
  Coverage   95.81%   95.81%           
=======================================
  Files          30       30           
  Lines        9605     9605           
  Branches     1443     1443           
=======================================
  Hits         9203     9203           
  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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant