Repository navigation
Fix docstring compliance (PY-D05) - #269
Felix-Mallinder wants to merge 1 commit into
Conversation
SimosManiatis
left a comment
There was a problem hiding this comment.
I checked that only docstrings and comments changed (the code is identical once docstrings are stripped), and check_docstrings.py reports no PY-D05 findings.
Conflicts with #272. Both PRs edit the default_scorer docstring in searchable_list_box.py, and merging them gives a conflict. #272's new fuzzy_scorer and default_scorer also have no Returns: section, so PY-D05 will fail again after both merge. Could you add Returns: in #272 and rebase whichever PR goes second?
Copyright headers. No .py file in the repo has one yet, and PY-F06 is still on the unmerged skill branch (#264). Adding headers to just these 8 files makes the repo inconsistent.
Document missing parameters (bhom_callable identifier, figure_to_base64 transparent), add a Returns section to default_scorer, and end parameter descriptions with a full stop. Add the BHoM copyright header (2015 - 2026) to each edited file. Docstrings and comments only, no code changes. Fixes #268 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0d2a544 to
80cff09
Compare
SimosManiatis
left a comment
There was a problem hiding this comment.
Python review - Python_Toolkit #269
Scope: 80cff09 against develop (5d5ee53). Eight .py files. Docstrings and the copyright comment only.
Automated: check_docstrings.py reports PY-D05: no findings on this branch. Current develop has 10 findings, including fuzzy_scorer and default_scorer with no Returns: section. With docstrings and comments stripped, the code tokens match develop on all eight files. pytest: 100 passed. black would reformat these same files on develop as well.
Blockers
None in this diff.
Major
The ten PY-D05 findings on develop are cleared here.
figure_to_base64: the newtransparentline matches the signature default (True).fuzzy_scorer:Returns:matches the code (the score when it is at leastmin_score, otherwiseNone).default_scorer:Returns:matches the code (200 for a word match, above any fuzzy score).
Earlier comments
This branch is rebased past #272, which is merged. fuzzy_scorer and default_scorer both have a Returns: section, so PY-D05 stays clean once this merges. Merging with current develop is clean: #273 does not touch these files.
The copyright headers stay. #265 has merged the skill onto develop, and PY-F06 asks for the header on every Python file a pull request changes. Files this PR does not touch stay as they are. These eight headers are the standard text, year 2015 - 2026.
Existing issues (not introduced by this PR)
- PY-F04: six of these files already start with a UTF-8 BOM on
develop. This branch keeps it, and the header text follows the BOM. - PY-F01: black would reformat these files on
developtoo. bhom_callablestill hasargument_types={}(PY-C01) and a bareexcept(PY-E01). This diff does not change that code.
Verdict
Approve
SimosManiatis
left a comment
There was a problem hiding this comment.
So the check_docstrings.py reports no PY-D05 findings on this branch. Current develop still has 10, including fuzzy_scorer and default_scorer with no Returns: section. With docstrings and comments stripped, the code in all eight files matches develop. pytest passed 100 tests on the rerun. The first run failed one Tk test with a local tcl_findLibrary error; that test is outside this diff, and the full suite then passed. The searchable-list tests, including fuzzy matching, passed both times so all good.
Also i saw that both scorers now have a Returns: section, and those lines match the code (200 for a word match, None when a fuzzy score is below min_score). figure_to_base64's new transparent line matches the signature default, True.
|
@BHoMBot check required |
|
@Felix-Mallinder to confirm, the following actions are now queued:
There are 195 requests in the queue ahead of you. |
Issues addressed by this PR
Closes #268
Fixes the 9 docstring gaps that the bhom-python skill's PY-D05 check (#264, #265) reports on
develop:bhom_callable: documentsidentifier.figure_to_base64: documentstransparent.default_scorer: adds aReturns:section.embed_image,embed_image_file,decay_rate_smoother(both copies),cmap_sample_plot,spatial_heatmap: parameter descriptions now end with a full stop.Each edited file also gets the BHoM copyright header (2015 - 2026), per the skill's PY-F06 rule. Only docstrings and comments change; there are no code changes.
Test files
From
Python_Engine/Python, runcheck_docstrings.py srcfrom the bhom-python skill (branchPython_Toolkit-#264-AddBHoMPythonClaudeSkill,.claude/skills/bhom-python/scripts/). It reportsPY-D05: no findings.Every edited file still parses.Changelog
Additional comments
The PY-F03 file-name findings from the same skill are out of scope here.
🤖 Generated with Claude Code