Fixed
- Fix incorrect blank line padding around
:returns:
and:raises:
fields.
Added
- Added more missing roles.
- Added support for Python 3.11.
- Added support for Python 3.12.
Changed
- Improved field sorting and formatting.
- Improved handling of
:param:
and:type:
fields. - Bumped
black
,docutils
,libcst
,platformdirs
, andsphinx
to latest versions.
Fixed
- Fix
:raises:
field not supporting types.
Removed
- Removed support for Python 3.6.
- Removed support for Python 3.7.
Fixed
- Fix
ImportError
when importing from black. Pinned black to 22.8.*.
Added
- Added a flag to skip the cache.
Fixed
- Fix
AttributeError
when accessingrawsource
during the handlingText
nodes.
Changed
- Bump maximum version of
click
from8.0.0
to9.0.0
. - Bump minimum version of
black
to22
.
Fixed
- An issue where docstrfmt would not properly find the
pyproject.toml
file.
Changed
- Switch from unmaintained
appdirs
to the replacementplatformdirs
.
Fixed
- An issue where the summary line of docstring was incorrectly wrapped.
Added
- Add
appdirs
dependency.
Added
- Add Pre-commit hooks.
Added
- Add a check for blank fields and raise an error when found.
- Add
toml
dependency.
Added
- Add ability to specify config setting from
pyproject.toml
.
Changed
- Use click<8.0.0 due to an issue with globbing on Windows.
Fixed
- Fix bug where exclude paths were not being excluded properly.
Changed
- Paths are now casted to string when parsing rst with docutils.
Fixed
- Fixed import error with sphinx>=4.0.0.
Fixed
- Fixed issue when target_version is not set in pyproject.toml.
Added
- Added currentmodule, function, and py:function directives.
Changed
- Updated black config parsing.
Fixed
- Fixed import error when parsing black config.
- Make docstrfmt operate in parallel when processing more than 2 files similar to psf/black.
- Added a caching mechanism similar to psf/black has so files that haven't changed from the last run won't be checked again.
Added
- Support for asynchronous functions.
- Ability to remove the blank line at the end of docstrings.
Changed
- Python file parsing now uses libcst.
- When misformatted files are found, location info is printed with the line where the error is found if possible.
Fixed
- Bug where some raw docstrings were not being formatted.
- Bug where some syntax errors in python blocks were not caught or raised correctly.
Fixed
- Fix UnicodeEncodeError in Windows Github Actions jobs.
Changed
- Open files with
UTF-8
encoding.
Fixed
- Fix encoding/decoding errors when opening files on Windows.
- First official docstrfmt release!
- Forked from dzhu/rstfmt
- Renamed to docstrfmt
- Added ability to format Python docstrings
- Switched to click for argument parsing
- Formatted code with black
- Made code easier to read
- Added more rst constructs
- Added more tests