- Changed
- Command line message about loading config file is now hidden with config
option
--quiet
- Command line message about loading config file is now hidden with config
option
- Fixed
- Fixed a bug where assigning a value to an attribute caused pydoclint to crash
- Changed
- Renamed function
unparseAnnotation()
intounparseNode()
- Renamed
EdgeCaseError
intoEdgeCaseError
- Renamed function
-
Fixed
- Fixed an edge case where type annotations are very long
-
Full diff
-
Fixed
- Fixed the logic of handling exceptions namespaces (
a.b.c.MyException
)
- Fixed the logic of handling exceptions namespaces (
-
Full diff
-
Added
- A new violation code,
DOC503
, which checks that exceptions in the function body match those in the "Raises" section of the docstring
- A new violation code,
-
Changed
- Switched from tab to 4 spaces in baseline
-
Full diff
-
Fixed
- Fixed a bug where pydoclint treats folders whose names end with
.py
as files
- Fixed a bug where pydoclint treats folders whose names end with
-
Full diff
-
Fixed
- Fixed a bug where
a = b = c = 1
style cannot be properly parsed (#151)
- Fixed a bug where
-
Changed
- Changed the default of
--treat-property-methods-as-class-attributes
toFalse
to restore backward compatibility
- Changed the default of
-
Full diff
-
Added
- An option
--should-document-private-class-attributes
(if False, private class attributes should not appear in the docstring) - An option
--treat-property-methods-as-class-attributes
(if True,@property
methods are treated like class attributes and need to be documented in the class docstring)
- An option
-
Full diff
-
Changed
- Added DOC604 & 605 test cases
- Improved DOC605 error message
-
Full diff
-
Changed
- Pinned to a higher version (0.0.9) of docstring_parser_fork
- Relaxed class attribute checking logic
- When a class has no docstring, no DOC6xx violations will be reported
- When a class has a short docstring (and
--skip-checking-short-docstrings
) is set toTrue
, no DOC6xx violations will be reported
-
Full diff
-
Fixed
- Fixed a bug in unparsing annotations when checking class attributes
- Fixed a bug in checking class attributes where there are no attributes in class def or in docstring
-
Changed
- Used a dedicated "attribute" section for Sphinx-style docstrings
-
Full diff
-
Added
- Added checks for class attributes
- This functionality checks class attributes against the "Attributes" section of the docstring
- There is a new config option,
--check-class-attributes
(or-cca
), which defaults toTrue
. Therefore, this breaks backward compatibility. - To maintain backward compatibility, set
--check-class-attributes
toFalse
- Options like
--check-arg-order
,--arg-type-hints-in-signature
, and--arg-type-hints-in-docstring
are still effective in checking class attributes
- Added checks for class attributes
-
Full diff
-
Changed
- Improved the violation message of DOC403 to remind users to add a return annotation
-
Full diff
-
Fixed
- A bug where using double quotes in Literal type (such as
Literal["foo"]
could produce a false positiveDOC203
violation. - Removed useless argument
--src
- A bug where using double quotes in Literal type (such as
-
Full diff
-
Changed
- Improved the violation message of DOC105: the arguments with inconsistent type hints are now shown in the violation message to make violation correction much easier
-
Full diff
-
Added
- A new config option
--show-filenames-in-every-violation-message
(or-sfn
), which makes it more convenient to jump to the corresponding line in IDEs by clicking on the violation message in the terminal
- A new config option
-
Full diff
-
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 (#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 (#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 (#79)
- Added an option
-
Full diff
- Improved
- Relaxed Generator/Iterator checking: stop enforcing the return annotation to be Generator if a function yields something (#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 (#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 (#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
(#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. (#63)
- Improved
- Used a try/catch block to capture potential recursion error, potentially due to too complex functions/classes (#65)
- Full diff
- Fixed
- Fixed a bug where union-style return types (such as
int | str
) in Google-style docstrings cannot be correctly parsed (#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 (#61)
- Fixed a broken URL that used to point to
- Full diff
- Fixed
- Correctly handle potentially unacceptable type hint formats (#59)
- Full diff
- Added
- Added handling of the
NoReturn
type annotation (#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. (#56)
- Full diff
- Added
- A documentation site to complement README
- Full diff
- Fixed
- Pass
--check-return-types
option to flake8 plugin (#52)
- Pass
- Full diff
- Fixed
- Fixed outdated naming of options
--type-hints-in-docstring
and--type-hints-in-signature
(#50)
- Fixed outdated naming of options
- Full diff
- Fixed
- Fixed incorrect blocking of "sphinx" style in CLI arguments (#49)
- Full diff
- Added
- Added support for the Sphinx docstring style (#43)
- Full diff
- Fixed
- Fixed a bug (#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 (#39)
- Full diff
- Fixed
- False positives when checking abstract methods (partially tackles #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
(#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 (#33)
- Full diff
- Fixed
- Fixed a bug (#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
(#19)
- Replaced the
- Full diff
- Added
- Fixed
- Changed
- Expanded the logic to identify generator functions (#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
(#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