Skip to content

chore: isolate docformatter cleanup#385

Merged
shaypal5 merged 1 commit into
masterfrom
codex/docformatter-comment-cleanup
Jun 3, 2026
Merged

chore: isolate docformatter cleanup#385
shaypal5 merged 1 commit into
masterfrom
codex/docformatter-comment-cleanup

Conversation

@shaypal5

@shaypal5 shaypal5 commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Rewrap existing docstrings in the files that docformatter v1.7.8 touches.
  • Convert two misplaced string literals in tests/test_general.py into ordinary comments.
  • Keep the docformatter dependency/configuration bump out of this PR so chore: bump docformatter to v1.7.8 #381 can stay focused on the hook update.

Closes #384.

Validation

  • ruff check src/cachier/core.py src/cachier/cores/base.py tests/conftest.py tests/test_general.py
  • pytest tests/test_general.py -m "not mongo"
  • pytest tests/test_general.py

The full tests/test_general.py run passed 32 cases and failed the 4 Mongo-marked cases locally because pymongo_inmemory triggers a Python 3.12 tarfile DeprecationWarning under warnings-as-errors while extracting its embedded MongoDB archive.

Current CI note

GitHub Actions pre-commit is currently failing before reaching this cleanup because the existing mutable typos hook rev (v1) resolves to typos==1.47.1, which is not available on PyPI. pre-commit.ci - pr passes on this branch.

Relationship to #381

This PR carries the cosmetic cleanup that docformatter v1.7.8 would otherwise introduce in #381. #381 is stacked on this branch and now shows only the docformatter hook bump/config change.

@shaypal5 shaypal5 force-pushed the codex/docformatter-comment-cleanup branch from 137d26e to 8d412c9 Compare June 3, 2026 10:35
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (93a8e3a) to head (8d412c9).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #385   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          16       16           
  Lines        2109     2109           
  Branches      251      251           
=======================================
  Hits         2108     2108           
  Partials        1        1           
Flag Coverage Δ
local 66.57% <ø> (ø)
mongodb 40.01% <ø> (ø)
postgres 42.05% <ø> (-0.05%) ⬇️
redis 44.57% <ø> (ø)
s3 41.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/cachier/core.py 100.00% <ø> (ø)
src/cachier/cores/base.py 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93a8e3a...8d412c9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shaypal5 shaypal5 merged commit 8baff9b into master Jun 3, 2026
63 checks passed
@shaypal5 shaypal5 deleted the codex/docformatter-comment-cleanup branch June 3, 2026 11:17
@gencurrent gencurrent mentioned this pull request Jun 7, 2026
2 tasks
shaypal5 pushed a commit that referenced this pull request Jun 7, 2026
v1.7.8 drops the unmaintained `untokenize` dependency (replaced by
stdlib `tokenize`), which was failing to install on Python 3.12+
runners due to `ast.Constant.s` removal. This unblocks pre-commit.ci
without the `ci.skip: [docformatter]` workaround added in #376.

v1.7.8 also introduces stricter docstring decisions that conflict
with ruff-format on a few patterns (see PyCQA/docformatter#354):
- blank lines after docstring-only function bodies (prometheus.py)
- blank lines between module docstring and first class (clients.py)
- multi-line string literals used as `exec()` arguments that
  docformatter mistakes for docstrings (test_varargs.py)

The 3 affected files are excluded from docformatter via a regex
`exclude:` in the hook config until upstream reconciles the
conventions or the patterns are restructured.

The cosmetic docstring/comment cleanup that v1.7.8's defaults
surface on already-conformant files was merged separately in #385.
@shaypal5 shaypal5 added AI & Agents area: agent-workflows Agent instructions, AI-assisted workflow docs, or bot-maintained guidance. area: ci GitHub Actions, pre-commit, codecov, or automation config. area: core-api Decorator API, cache semantics, or public behavior. area: docs README, examples, contributor docs, or repo documentation. area: tests Test suite, fixtures, coverage, or local test scripts. CI codex outcome: merged Merged into the repository. source: codex Opened from a Codex-assisted workflow. testing and development type: ci GitHub Actions, CI configuration, or automation workflow change. type: docs Documentation-only or documentation-focused change. labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core-api Decorator API, cache semantics, or public behavior. area: tests Test suite, fixtures, coverage, or local test scripts. CI outcome: merged Merged into the repository. size: medium Medium PR by changed-file count. source: codex Opened from a Codex-assisted workflow. type: ci GitHub Actions, CI configuration, or automation workflow change. type: refactor Internal restructuring without intended behavior change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Isolate docformatter cleanup from dependency bump

1 participant