Skip to content

fix: do not add a blank line before async with - #372

Open
Johnkothapalli wants to merge 1 commit into
PyCQA:masterfrom
Johnkothapalli:fix/async-with-docstring-spacing
Open

fix: do not add a blank line before async with#372
Johnkothapalli wants to merge 1 commit into
PyCQA:masterfrom
Johnkothapalli:fix/async-with-docstring-spacing

Conversation

@Johnkothapalli

Copy link
Copy Markdown

Summary

  • require async def rather than any indented async statement when classifying nested definitions
  • preserve the existing nested async def behavior
  • add classifier and end-to-end regressions showing that async with does not gain a blank line after a function docstring

Fixes #351.

Validation

  • tox -e py314 under Ubuntu/WSL — 241 unit tests passed (1 skipped), 271 integration tests passed (2 skipped), and 40 system tests passed
  • pre-commit relevant hooks — merge/TOML/YAML/debug checks, Black, isort, docformatter, Ruff, manifest validation, eradicate, and rstcheck passed
  • git diff --check — passed

The full lint workflow on upstream master is already red (run 31345372152) because CHANGELOG.md is changed by end-of-file-fixer, _is_blank_line has an existing D301 finding, and configuration.py has an existing MyPy assignment error. This patch does not change those lines or include their unrelated cleanup.

AI assistance: Codex helped trace the classifier path and prepare the focused tests. The result was verified with the repository's Ubuntu tox gate above.

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.

The docformatter adds blank line between ocstring and async with block (conflicts with Ruff (pydocsyle))

1 participant