-
Fixed
- False positive violation
DOC203
when there is no docstring return section for methods with@property
decorator
- False positive violation
-
Full diff
-
Fixed
- A bug in handling prepended escape characters in docstrings
-
Changed
- Improved documentation
-
Full diff
-
Changed
- Improved documentation
- Disabled parallel mode for pre-commit (jsh9#93)
-
Full diff
-
Fixed
- Updated dependency (docstring_parser_fork) to 0.0.5 to fix issues when parsing Google-style return section
-
Full diff
-
Changed
- When checking for consistency betwene the docstring arguments and the
arguments in the function signature, ignore underscore arguments (
_
,__
,___
, ...) in the arguments in the function signature
- When checking for consistency betwene the docstring arguments and the
arguments in the function signature, ignore underscore arguments (
-
Full diff
-
Changed
- Don't check type hints for DOC103 (jsh9#86)
-
Full diff
-
Added
- Added baseline file integration and 2 options:
--generate-baseline True
Generate baseline content, and write it to a file specified from--baseline
option path.--baseline <PATH>
Specify path to file with baseline content.
- Added baseline file integration and 2 options:
-
Changed
- For the
--config
option, the default value is nowpyproject.toml
.
- For the
-
Full diff
-
Changed
- Make
flake8
an optional dependency
- Make
-
Full diff
-
Added
- Added an option
--require-yield-section-when-yielding-nothing
(defaulting toFalse
). When it's False, we don't need a "Yields" section when a function yields None (jsh9#79)
- Added an option
-
Full diff
- Improved
- Relaxed Generator/Iterator checking: stop enforcing the return annotation to be Generator if a function yields something (jsh9#76)
- Added handling of functions that both return something and yield something
- Changed
- Used docstring_parser_fork to parse numpy-style docstrings, because the official numpydoc doesn't support both Yields and Returns sections in a single docstring
- Removed
- Dependency on numpydoc
- Full diff
- Fixed
- A bug with unparsing yield types (jsh9#75 (comment))
- Full diff
- Fixed
- A bug with yields type checking
- A typo in
DOC403
code logic
- Full diff
-
Improved
- Improved handling of escape symbol (
\
) in docstrings (jsh9#73)
- Improved handling of escape symbol (
-
Full diff
-
Improved
- Improved handling of backticks or double backticks being used in type hints in docstrings
-
Full diff
- Added
- Added checking of yield types (between function signature and the
docstring's Yields section), as well as a corresponding violation:
DOC404
- Added checking of incompatibility between
Generator
/Iterator
and theyield
/return
statements, as well as a corresponding violation:DOC405
(jsh9#68)
- Added checking of yield types (between function signature and the
docstring's Yields section), as well as a corresponding violation:
- Fixed
- Fixed a bug where raise/return/yield statements in match-case blocks are incorrectly identified. (jsh9#63)
- Improved
- Used a try/catch block to capture potential recursion error, potentially due to too complex functions/classes (jsh9#65)
- Full diff
- Fixed
- Fixed a bug where union-style return types (such as
int | str
) in Google-style docstrings cannot be correctly parsed (jsh9#66)
- Fixed a bug where union-style return types (such as
- Full diff
- Fixed
- Fixed a broken URL that used to point to
DOC103
notes (jsh9#61)
- Fixed a broken URL that used to point to
- Full diff
- Fixed
- Correctly handle potentially unacceptable type hint formats (jsh9#59)
- Full diff
- Added
- Added handling of the
NoReturn
type annotation (jsh9#55)
- Added handling of the
- Full diff
- Improved
- Improved algorithm to compare type hints, so that type hints are considered equal if their actual meanings are the same. (jsh9#56)
- Full diff
- Added
- A documentation site to complement README
- Full diff
- Fixed
- Pass
--check-return-types
option to flake8 plugin (jsh9#52)
- Pass
- Full diff
- Fixed
- Fixed outdated naming of options
--type-hints-in-docstring
and--type-hints-in-signature
(jsh9#50)
- Fixed outdated naming of options
- Full diff
- Fixed
- Fixed incorrect blocking of "sphinx" style in CLI arguments (jsh9#49)
- Full diff
- Added
- Added support for the Sphinx docstring style (jsh9#43)
- Full diff
- Fixed
- Fixed a bug (jsh9#44) where tuple type annotation is incorrectly detected
- Full diff
- Fixed
- Full diff
- Fixed
- Fixed an issue where quotes in return annotations are not properly handled (jsh9#39)
- Full diff
- Fixed
- False positives when checking abstract methods (partially tackles jsh9#31)
- Full diff
- Fixed
- False positive of DOC203 when
--require-return-section-when-returning-None
isFalse
, the docstring has no return section, and the return annotation isNone
(jsh9#34)
- False positive of DOC203 when
- Full diff
- Added
- A new violation code, DOC203, which is about inconsistency between return types in the docstring and in the return annotation (jsh9#33)
- Full diff
- Fixed
- Fixed a bug (jsh9#19) in checking type hints when the function signature only contains star arguments
- Full diff
- Changed
- Replaced the
--check-type-hint
option with two new options:--type-hints-in-docstring
and--type-hints-in-signature
(jsh9#19)
- Replaced the
- Full diff
- Added
- Fixed
- Changed
- Expanded the logic to identify generator functions (jsh9#15)
- Full diff
- Fixed
- Fixed a bug where re-raising an exception was not handled properly
- Full diff
- Fixed
- A typo in
DOC103
error message that resulted in an invalid URL
- A typo in
- Full diff
- Added
- A new option to allow no return section in the docstring if the function
implicitly returns
None
(jsh9#6)
- A new option to allow no return section in the docstring if the function
implicitly returns
- Changed
- Full diff
- Added
- Changed
- Used AST unparser to unparse type annotation nodes
- Fixed
- A bug when parsing type annotations such as
Callable[[int], str]
- A bug when parsing type annotations such as
- Full diff
- Added
- Added support for Google-style docstrings
- Full diff
- Added
- New command line options
- Fixed
- Fixed an issue where star arguments (*, *args, **kwargs) were omitted
- Full diff
Initial release