Changelog¤
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.5.1 - 2024-10-18¤
Bug Fixes¤
- Sort Git tags using
creatordate
field, which works with both lightweight and annotated tags (3bfa401 by Timothée Mazzucotelli). Issue-327
1.5.0 - 2024-10-18¤
Features¤
- Allow setting and deleting parameters within container (19f354d by Timothée Mazzucotelli).
1.4.1 - 2024-10-12¤
Code Refactoring¤
- Drop support for Python 3.8 (f2d39b8 by Timothée Mazzucotelli).
1.4.0 - 2024-10-11¤
Features¤
- Add Markdown and GitHub output formats to the
griffe check
command (806805c by Timothée Mazzucotelli).
1.3.2 - 2024-10-01¤
Bug Fixes¤
1.3.1 - 2024-09-12¤
Bug Fixes¤
- Refactor and fix logic again for fetching returns/yields/receives annotation from parents (a80bd3c by Timothée Mazzucotelli). Follow-up-of-PR-322
- Don't crash on invalid signature given "Receives" section (1cb8f51 by Timothée Mazzucotelli).
1.3.0 - 2024-09-10¤
Features¤
- Allow deselecting multiple or named items in Yields and Receives (344df50 by Marco Ricci). Issue-263
Bug Fixes¤
- Don't crash when trying to merge stubs into a compiled module that has no file path (e1f3ed9 by Timothée Mazzucotelli). Issue-323
- Fix identity checks in inspector when handling attributes (676cfb4 by Timothée Mazzucotelli).
Code Refactoring¤
- Extract common functionality in Returns, Yields and Receives parsing (c768356 by Marco Ricci). Issue-263
- Remove useless branch in
resolve
method, add tests for it (aa6c7e4 by Timothée Mazzucotelli).
1.2.0 - 2024-08-23¤
Features¤
1.1.1 - 2024-08-20¤
Bug Fixes¤
- Preemptively expand
__all__
values and wildcard imports before firing theon_package_loaded
event (21b3780 by Timothée Mazzucotelli).
1.1.0 - 2024-08-17¤
Features¤
- Add
on_wildcard_expansion
event (c6bc6fa by Timothée Mazzucotelli). Issue-282 - Add
on_alias
event (a760a8c by Timothée Mazzucotelli). Issue-282 - Pass
loader
toon_package_loaded
hooks (7f82dc3 by Timothée Mazzucotelli).
1.0.0 - 2024-08-15¤
V1!
Breaking changes¤
Highlights:
- Extensions inherit from
Extension
, (VisitorExtension
andInspectorExtension
are removed) - Members are serialized (
as_dict
/JSON) as a dictionary instead of a list - All objects are available in the top-level
griffe
module, nowhere else
Removed objects:
- all modules under the
griffe
package - the
griffe.DocstringWarningCallable
class - the
griffe.When
class - the
griffe.ExtensionType
type - the
griffe.InspectorExtension
class - the
griffe.VisitorExtension
class - the
griffe.HybridExtension
extension - the
griffe.patch_logger
function - the
griffe.JSONEncoder.docstring_parser
attribute - the
griffe.JSONEncoder.docstring_options
attribute - the
griffe.Extensions.attach_visitor
method - the
griffe.Extensions.attach_inspector
method - the
griffe.Extensions.before_visit
method - the
griffe.Extensions.before_children_visit
method - the
griffe.Extensions.after_children_visit
method - the
griffe.Extensions.after_visit
method - the
griffe.Extensions.before_inspection
method - the
griffe.Extensions.before_children_inspection
method - the
griffe.Extensions.after_children_inspection
method - the
griffe.Extensions.after_inspection
method - the
griffe.GriffeLoader.load_module
method - the
has_special_name
andhas_private_name
properties on objects - the
is_explicitely_exported
andis_implicitely_exported
properties on objects - the
member_is_exported
method on objects
Renamed/moved objects:
griffe.Function.setter
->griffe.Attribute.setter
griffe.Function.deleter
->griffe.Attribute.deleter
Signatures:
griffe.docstring_warning(name)
parameter was removedgriffe.GriffeLoader.load(module)
parameter was removedgriffe.load(module)
parameter was removedgriffe.load_git(module)
parameter was removedgriffe.find_breaking_changes(ignore_private)
parameter was removed- see previous deprecations
Code Refactoring¤
0.49.0 - 2024-08-14¤
⚡ Imminent v1! ⚡🚀 See v0.46.
Deprecations¤
- Cancel deprecation of
get_logger
andpatch_loggers
(and deprecatepatch_logger
instead). Extensions need loggers too, distinct ones, and they were forgotten... Sorry for the back and forth 🙇 - Attributes
setter
anddeleter
onFunction
are deprecated. They were moved into theAttribute
class since properties are instantiated as attributes, not functions. - Extension hooks must accept
**kwargs
in their signature, to allow forward-compatibility. Accepting**kwargs
also makes it possible to remove unused arguments from the signature. - In version 1, Griffe will serialize object members as dictionaries instead of lists. Lists were initially used to preserve source order, but source order can be re-obtained thanks to the line number attributes (
lineno
,endlineno
). Version 0.49 is able to load both lists and dictionaries from JSON dumps, and version 1 will maintain this ability. However external tools loading JSON dumps will need to be updated.
Features¤
- Add
temporary_inspected_package
helper (3c4ba16 by Timothée Mazzucotelli). - Accept alias resolution related parameters in
temporary_visited_package
(7d5408a by Timothée Mazzucotelli). - Accept
inits
parameter intemporary_visited_package
(a4859b7 by Timothée Mazzucotelli). - Warn (DEBUG) when an object coming from a sibling, parent or external module instead of the current module or a submodule is exported (listed in
__all__
) (f82317a by Timothée Mazzucotelli). Issue-249, Related-to-PR-251 - Pass down agent to extension hooks (71acb01 by Timothée Mazzucotelli). Issue-312
- Add
source
property to docstrings, which return the docstring lines as written in the source (3f6a71a by Timothée Mazzucotelli). Issue-90
Bug Fixes¤
- Move
setter
anddeleter
toAttribute
class instead ofFunction
, since that's how properties are instantiated (309c6e3 by Timothée Mazzucotelli). Issue-311 - Reduce risk of recursion errors by excluding imported objects from
has_docstrings
, unless they're public (9296ca7 by Timothée Mazzucotelli). Issue-302 - Fix retrieval of annotations from parent for Yields section in properties (8a21f4d by Timothée Mazzucotelli). Issue-298
- Fix parsing Yields section (Google-style) when yielded values are tuples, and the description has more lines than tuple values (9091776 by Timothée Mazzucotelli).
- Fix condition on objects kinds when merging stubs (727f99b by Timothée Mazzucotelli).
Code Refactoring¤
- Sort keys when dumping JSON from the command line (8cdffe9 by Timothée Mazzucotelli). Issue-310
- Handle both lists and dicts for members when loading JSON data in preparation of v1 (f89050c by Timothée Mazzucotelli). Issue-310
- Accept
**kwargs
in extension hooks to allow forward-compatibility (2621d52 by Timothée Mazzucotelli). Issue-312 - Revert deprecation of
patch_loggers
in favor ofpatch_logger
(a20796a by Timothée Mazzucotelli). - Expose dummy
load_pypi
in non-Insiders version (a69cffd by Timothée Mazzucotelli). - Don't emit deprecation warnings through own usage of deprecated API (9922d74 by Timothée Mazzucotelli). Issue-mkdocstrings#676
- Finish preparing docstring style auto-detection feature (03bdec6 by Timothée Mazzucotelli). Issue-5
- Add DocstringStyle literal type to prepare docstring style auto detection feature (b7aaf64 by Timothée Mazzucotelli). Issue-5
- Inherit from
str, Enum
instead ofStrEnum
which needs a backport (77f1544 by Timothée Mazzucotelli). Issue-307
0.48.0 - 2024-07-15¤
⚡ Imminent v1! ⚡🚀 See v0.46.
Deprecations¤
- All submodules are deprecated. All objects are now exposed in the top-level
griffe
module. - All logger names are deprecated, and will be replaced with
"griffe"
in v1. In v1 our single"griffe"
logger will provide a method to temporarily disable logging,logger.disable()
, since that's the most common third-party use. - The
get_logger
function is deprecated. Instead, we'll use a globallogger
internally, and users are welcome to use it too. - The
patch_loggers
function is renamedpatch_logger
. - Following the logging changes, the
docstring_warning
function can now directly log a warning message instead of returning a callable that does. Passing it a logger name (to get a callable) is deprecated in favor of passing it a docstring, message and offset directly.
Features¤
- Support
FORCE_COLOR
environment variable (e1b7bd9 by Timothée Mazzucotelli).
Bug Fixes¤
- Don't take a shortcut to the end of an alias chain when getting/setting/deleting alias members (1930609 by Timothée Mazzucotelli).
- Short-circuit
__all__
convention when checking if a module is public (5abf4e3 by Timothée Mazzucotelli). - Reuse existing loggers, preventing overwriting issues (3c2825f by Timothée Mazzucotelli).
- Ignore .pth files that are not utf-8 encoded (ea299dc by Andrew Sansom). Issue-300, PR-301
- Attributes without annotations cannot be dataclass parameters (c9b2e09 by Hassan Kibirige). PR-297
- When deciding to alias an object or not during inspection, consider module paths to be equivalent even with arbitrary private components (8c9f6e6 by Timothée Mazzucotelli). Issue-296
- Fix target path computation: use qualified names to maintain classes in the path (6e17def by Timothée Mazzucotelli). Issue-296
Code Refactoring¤
- Prepare loggers for simplification (381f10f by Timothée Mazzucotelli).
- Add all previous modules for backward compatibility (a86e44e by Timothée Mazzucotelli).
- Add main public modules (fb860b3 by Timothée Mazzucotelli).
- Simplify "is imported" check in
is_public
property (c2bbc10 by Timothée Mazzucotelli). - Use string and integer enumerations (06b383b by Timothée Mazzucotelli).
- Renamed agents nodes modules (ddc5b0c by Timothée Mazzucotelli).
- Clean up and document internal API, mark legacy code (92594a9 by Timothée Mazzucotelli).
- Renamed
dataclasses
internal modules tomodels
(5555de6 by Timothée Mazzucotelli). - Move sources under
_griffe
internal package (cbce6a5 by Timothée Mazzucotelli).
0.47.0 - 2024-06-18¤
⚡ Imminent v1! ⚡🚀 See v0.46.
Deprecations¤
- The
has_private_name
andhas_special_name
properties on objects and aliases have been renamedis_private
andis_special
. Theis_private
property now only returns true if the name is not special.
Features¤
- Add
deprecated
attribute andis_deprecated
property to objects/aliases (2a75d84 by Timothée Mazzucotelli). - Add
is_imported
property to objects/aliases (de926cc by Timothée Mazzucotelli). - Add
is_class_private
property to objects/aliases (491b6c4 by Timothée Mazzucotelli).
Code Refactoring¤
- Rename
has_private_name
andhas_special_name
tois_private
andis_special
(ae7c7e7 by Timothée Mazzucotelli).
0.46.1 - 2024-06-17¤
⚡ Imminent v1! ⚡🚀 See v0.46.
Bug Fixes¤
- Always consider special objects ("dunder" attributes/methods/etc.) to be public (3319410 by Timothée Mazzucotelli). Issue-294, Issue-295
- Don't consider imported objects as public (ea90952 by Timothée Mazzucotelli). Discussion-169
0.46.0 - 2024-06-16¤
⚡ Imminent v1! ⚡🚀
We are working on v1, and it will come soon, so we recommend that you consider adding an upper bound on Griffe. Version 1 will remove all legacy code! There will be a couple more v0 before so that you get all the deprecation warnings needed to upgrade your code using Griffe before upgrading to v1. See breaking changes and deprecations for v0.46 below.
Breaking Changes¤
We are still in v0, so no major bump yet.
- Calling objects'
has_labels()
method with alabels
keyword argument is not supported anymore. The parameter became a variadic positional parameter, so it cannot be used as a keyword argument anymore. Passing a sequence instead of multiple positional arguments still works but will emit a deprecation warning. - Calling the
load_extensions()
function with anexts
keyword argument is not supported anymore. The parameter became a variadic positional parameter, so it cannot be used as a keyword argument anymore. Passing a sequence instead of multiple positional arguments still works but will emit a deprecation warning.
Deprecations¤
- As seen above in the breaking changes section, the only parameters of
Object.has_labels()
andload_extensions()
both became variadic positional parameters. Passing a sequence as single argument is deprecated in favor of passing multiple arguments. This is an ergonomic change: I myself often forgot to wrap extensions in a list. Passing sequences of labels (lists, sets, tuples) is also difficult from Jinja templates. - The following methods and properties on objects and aliases are deprecated:
member_is_exported()
,is_explicitely_exported
,is_implicitely_exported
. Use theis_exported
property instead. See issue 281. - The
is_exported()
andis_public()
methods became properties. They can still be called like methods, but will emit deprecation warnings when doing so. See issue 281. - The
ignore_private
parameter of thefind_breaking_changes()
function is now deprecated and unused. With the reworked "exported" and "public" API, this parameter became useless. See issue 281. - Using
stats()
instead ofStats
will now emit a deprecation warning.
Features¤
- Add
docstring
attribute to parameters (e21eabe by Hassan Kibirige). Issue-286, Related-to-mkdocstrings/griffe#252, PR-288, Co-authored-by: Timothée Mazzucotelli dev@pawamoy.fr - Provide line numbers for classes and functions when inspecting (b6ddcc4 by Timothée Mazzucotelli). Issue-272
- Populate lines collection within helpers (ab2e947 by Timothée Mazzucotelli). GitHub-issue-270, Radicle-issue-0d6a513
Bug Fixes¤
- Handle partials as functions while inspecting (be29c32 by Timothée Mazzucotelli).
- Populate lines collection before visiting/inspecting modules within helpers (08c3f40 by Timothée Mazzucotelli). Issue-272
- Don't return all lines when line numbers are missing (9e6dcaa by Timothée Mazzucotelli). Issue-271
Code Refactoring¤
- Emit deprecation warning when accessing
stats
instead ofStats
(e5572d2 by Timothée Mazzucotelli). - Rework "exported" and "public" logic (b327b90 by Timothée Mazzucotelli). Issue-281
- Allow passing multiple extensions to
load_extensions
instead of a sequence (fadb72b by Timothée Mazzucotelli). Issue-268 - Allow passing multiple labels to
Object.has_labels
instead of set (c4e3bf2 by Timothée Mazzucotelli). Issue-267
0.45.3 - 2024-06-09¤
Bug Fixes¤
- Always call
on_package_loaded
hook on a package, and not any other object (40db38d by Timothée Mazzucotelli). Issue-283
0.45.2 - 2024-05-23¤
Bug Fixes¤
- Support setuptools' new editable modules using type annotations (14d45e8 by Timothée Mazzucotelli). Issue-273
0.45.1 - 2024-05-18¤
Bug Fixes¤
- Fix loading of importable modules thanks to their
__path__
attribute (56f5363 by Timothée Mazzucotelli). Issue-269
0.45.0 - 2024-05-12¤
Features¤
- Implement
-x
,--force-inspection
CLI option (776063d by Timothée Mazzucotelli). - Implement
force_inspection
option in the loader API (3266f22 by Timothée Mazzucotelli). - Support inspecting packages (
__init__
modules) (3f74f67 by Timothée Mazzucotelli). - Add parameters for resolving aliases to
load
functions (e418dee by Timothée Mazzucotelli). - Load private sibling modules by default when resolving aliases (4806189 by Timothée Mazzucotelli).
Bug Fixes¤
- Pass down modules collection when inspecting (bc0f74b by Timothée Mazzucotelli).
- Catch loading errors when loading additional modules during wildcard expansion and alias resolution (964e0d2 by Timothée Mazzucotelli).
Code Refactoring¤
- Improve stats code and performance (eeb497f by Timothée Mazzucotelli).
- Recurse immediately into non-discoverable submodules (no path on disk) during dynamic analysis (d0b7a1d by Timothée Mazzucotelli).
- Simplify the code that checks if an object should be aliased or not during dynamic analysis (fc794c2 by Timothée Mazzucotelli).
- Avoid side-effect in inspector by checking early if an object is a cached property (a6bfcfd by Timothée Mazzucotelli).
0.44.0 - 2024-04-19¤
Features¤
- Add
resolved
property on expression names, returning the corresponding Griffe object (9b5ca45 by Timothée Mazzucotelli).
Bug Fixes¤
- Fix enumeration properties on expression names (6f22256 by Timothée Mazzucotelli).
0.43.0 - 2024-04-18¤
Features¤
- Add properties telling whether an expression name resolves to an enumeration class, instance or value (fdb21d9 by Timothée Mazzucotelli). Issue-mkdocstrings/python#124
0.42.2 - 2024-04-15¤
Bug Fixes¤
- Fix target path of aliases for multipart imports (
import a.b.c as x
) (ee27ad9 by Timothée Mazzucotelli). Issue-259
0.42.1 - 2024-03-19¤
Bug Fixes¤
- Don't return class variables as parameters of dataclasses (2729c22 by Hassan Kibirige). PR-253
- Don't turn items annotated as InitVar into dataclass members (6835ea3 by Hassan Kibirige). PR-252
0.42.0 - 2024-03-11¤
Features¤
- Better support for dataclasses (82a9d57 by Timothée Mazzucotelli). Issue-33, Issue-34, Issue-38, Issue-39, PR-240
Bug Fixes¤
- Don't return properties as parameters of dataclasses (again) (8c48397 by Hassan Kibirige). Issue-232, PR-248
- Fix getting return type from parent property when parsing Sphinx docstrings (f314957 by Timothée Mazzucotelli). Issue-125
Code Refactoring¤
- Warn (debug) when a submodule shadows a member with the same name (cdc9e1c by Timothée Mazzucotelli). Issue-124
0.41.3 - 2024-03-04¤
Code Refactoring¤
- Catch index errors when finding top module in case of search path misconfiguration (46c56c7 by Timothée Mazzucotelli). Issue-#246
0.41.2 - 2024-03-03¤
Bug Fixes¤
- Fix discovery of packages in the current working directory (44f9617 by Timothée Mazzucotelli). Discussion-mkdocstrings#654
0.41.1 - 2024-03-01¤
Deprecations¤
- The
load_git
function moved fromgriffe.git
togriffe.loader
. It is still importable fromgriffe.git
, but will emit a deprecation warning.
Code Refactoring¤
- Expose Git utilities, move
load_git
into theloader
module (327cc5b by Timothée Mazzucotelli).
0.41.0 - 2024-02-26¤
Features¤
- Add option to append
sys.path
to search paths to the check command too (d153fa0 by Timothée Mazzucotelli).
Bug Fixes¤
- Special case NumpyDoc "warnings" and "notes" sections (plural) (3b47cdb by Ethan Henderson). PR #236
- Serialize line numbers even if zero (55e6e0e by Timothée Mazzucotelli).
- Fix handling of lambda expressions (598d08a by Timothée Mazzucotelli).
- Fix building expressions (and string values) for
yield
andyield from
statements (439f65e by Timothée Mazzucotelli). - Do not create aliases pointing to themselves (356305f by Timothée Mazzucotelli).
Code Refactoring¤
- Remove
get_call_keyword_arguments
utility function, as it is implemented with a single line and creates a cyclic dependency with expressions (35cf170 by Timothée Mazzucotelli). - Further prevent cyclic dependency between node utils and expressions (9614c83 by Timothée Mazzucotelli).
- Avoid cyclic dependency between node utils and expressions (aedf39c by Timothée Mazzucotelli).
- Move arguments node-parsing logic into its own module (used by visitor and lambda expressions) (ad68e65 by Timothée Mazzucotelli).
- Use canonical imports (3091660 by Timothée Mazzucotelli).
- Use
ast.unparse
instead of our own unparser (6fe1316 by Timothée Mazzucotelli). - Only return 0 for the line number of removed objects when the location is reworked as relative (3a4d054 by Timothée Mazzucotelli).
0.40.1 - 2024-02-08¤
Bug Fixes¤
- Don't return properties as parameters of dataclasses (5a5c03b by Timothée Mazzucotelli). Issue #232
0.40.0 - 2024-01-30¤
Features¤
0.39.1 - 2024-01-18¤
Bug Fixes¤
- De-duplicate search paths in finder as they could lead to the same modules being yielded twice or more when scanning namespace packages (80a158a by Timothée Mazzucotelli).
- Fix logic for skipping already encountered modules when scanning namespace packages (21a48d0 by Timothée Mazzucotelli). Issue mkdocstrings#646
0.39.0 - 2024-01-16¤
Features¤
- Support editable installs dynamically exposing modules from other directories (2c4ba75 by Timothée Mazzucotelli). Issue #229
- Support meson-python editable modules (9123897 by Timothée Mazzucotelli).
- Support admonitions in Numpydoc docstrings (1e311a4 by Michael Chow). Issue #214, PR #219, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
- Expose module properties on all objects (123f8c5 by Timothée Mazzucotelli). Issue #226
Bug Fixes¤
- Consider space-only lines to be empty, never break Numpydoc sections on blank lines (8c57354 by Timothée Mazzucotelli). PR #220, Related to PR #219, Numpydoc discussion
- Allow merging stubs into alias targets (3cf7958 by Timothée Mazzucotelli).
- Insert the right directory in front of import paths before inspecting a module (dynamically imported) (7d75c71 by Timothée Mazzucotelli).
Code Refactoring¤
- Set lineno to 0 for removed objects when checking API (b660c34 by Timothée Mazzucotelli).
- Prepare support for new output formats (styles) of the check command (f2ece1e by Timothée Mazzucotelli).
- Transform finder's package and namespace package classes into dataclasses (16be6a4 by Timothée Mazzucotelli).
0.38.1 - 2023-12-06¤
Bug Fixes¤
- Support absolute Windows paths for extensions (4e67d8f by Timothée Mazzucotelli). Issue mkdocstrings-python#116
0.38.0 - 2023-11-13¤
Features¤
- Allow passing load parameters to the temporary package visit helper (3a7854f by Timothée Mazzucotelli).
0.37.0 - 2023-11-12¤
Deprecations¤
- The loader
load_module
method was renamedload
, Itsmodule
parameter was renamedobjspec
and is now positional-only. This method always returned the specified object, not just modules, so it made more sense to rename itload
and to rename the parameter specifying the object. Old usages (load_module
andmodule=...
) will continue to work for some time (a few months, a year, more), and will emit deprecation warnings.
Features¤
- Add option to warn about unknown parameters in Sphinx docstrings (8b11d77 by Ashwin Vinod). Issue #64, PR #210, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
- Add
on_package_loaded
event (a5cf654 by Timothée Mazzucotelli). - Add option to find, load and merge stubs-only packages (6e55f3b by Romain). PR #221, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
Bug Fixes¤
- Report attributes who lost their value as "unset" (dfffa4b by Geethakrishna-Puligundla). Issue #218, PR #225
- Don't crash when computing MRO for a class that is named after its parent (a2dd8a6 by Timothée Mazzucotelli).
Code Refactoring¤
- Rename loader
load_module
method toload
(2bfe206 by Timothée Mazzucotelli).
0.36.9 - 2023-10-27¤
Bug Fixes¤
- Fix accessing alias members with
__getitem__
(8929409 by Timothée Mazzucotelli). Issue mkdocstrings-python#111
Code Refactoring¤
- Expose parser enumeration and parser functions in top-level module (785baa0 by Timothée Mazzucotelli).
0.36.8 - 2023-10-25¤
Bug Fixes¤
- Use already parsed docstring sections when dumping full data (311807b by Timothée Mazzucotelli). Discussion griffe-typingdoc#6
0.36.7 - 2023-10-17¤
Bug Fixes¤
- Add missing proxies (methods/properties) to aliases (7320640 by Timothée Mazzucotelli).
Code Refactoring¤
- Use final target in alias proxies (731d662 by Timothée Mazzucotelli).
0.36.6 - 2023-10-16¤
Code Refactoring¤
- Only consider presence/absence for docstrings truthiness, not emptiness of their value (4c49611 by Timothée Mazzucotelli).
0.36.5 - 2023-10-09¤
Bug Fixes¤
- Force extension import path to be a string (coming from MkDocs'
!relative
tag) (34e21a9 by Timothée Mazzucotelli). - Fix crash when trying to get a decorator callable path (found thanks to pysource-codegen) (e57f08e by Timothée Mazzucotelli).
- Fix crash when trying to get docstring after assignment (found thanks to pysource-codegen) (fb0a0c1 by Timothée Mazzucotelli).
- Fix type errors in expressions and value extractor, don't pass duplicate arguments (found thanks to pysource-codegen) (7e53288 by Timothée Mazzucotelli).
0.36.4 - 2023-09-28¤
Bug Fixes¤
- Fix visiting relative imports in non-init modules (c1138c3 by Timothée Mazzucotelli).
0.36.3 - 2023-09-28¤
Bug Fixes¤
- Fix parsing of choices in Numpy parameters (5f2d997 by Timothée Mazzucotelli). Issue #212
Code Refactoring¤
- Add
repr
methods to function parameters (9442234 by Timothée Mazzucotelli).
0.36.2 - 2023-09-10¤
Bug Fixes¤
- Fix warnings for docstrings in builtin modules (6ba3e04 by Timothée Mazzucotelli).
- Fix dumping
filepath
to a dict when it is a list (066a4a7 by davfsa). PR #207
0.36.1 - 2023-09-04¤
Bug Fixes¤
- Fix iterating non-flat expressions (some nodes were skipped) (3249155 by Timothée Mazzucotelli).
0.36.0 - 2023-09-01¤
Features¤
- Add option to read return type of properties in their summary (Google-style) (096970f by Timothée Mazzucotelli). Issue #137, PR #206
- Add option to make parentheses around the type of returned values optional (Google-style) (b0620f8 by Timothée Mazzucotelli). Issue #137
- Get class parameters from parent's
__init__
method (e8a9fdc by Timothée Mazzucotelli). Issue #205
Bug Fixes¤
- Use all members (declared and inherited) when checking for breakages, avoid false-positives when a member of a class is moved into a parent class (1c4340b by Timothée Mazzucotelli). Issue #203
- Skip early submodules with dots in their path (5e81b8a by Timothée Mazzucotelli). Issue #185
Code Refactoring¤
- Allow iterating on expressions in both flat and nested ways (3957fa7 by Timothée Mazzucotelli).
0.35.2 - 2023-08-27¤
Code Refactoring¤
- Be more strict when parsing sections in Google docstrings (6a8a228 by Timothée Mazzucotelli). Issue #204
0.35.1 - 2023-08-26¤
Bug Fixes¤
- Preserve inherited attribute on alias inherited members (1e19e7b by Timothée Mazzucotelli). Issue mkdocstrings/python#102
0.35.0 - 2023-08-24¤
Features¤
- Add an
is_public
helper method to guess if an object is public (b823639 by Timothée Mazzucotelli). - Add option to Google parser allowing to parse Returns sections with or without multiple items (65fee70 by Antoine Dechaume). PR #196
Bug Fixes¤
- Allow passing
warn_unknown_params
option to Google and Numpy parsers (5bf0746 by Timothée Mazzucotelli).
Code Refactoring¤
- Preserve alias members path by re-aliasing members instead of returning target's members (d400cb1 by Timothée Mazzucotelli).
0.34.0 - 2023-08-20¤
Features¤
- Allow checking if docstring section is empty or not with
if section
(f6cf559 by Timothée Mazzucotelli). - Implement Functions (or Methods), Classes and Modules docstring sections (929e615 by Timothée Mazzucotelli).
- Allow passing a docstring parser name instead of its enumeration value (ce59b7d by Timothée Mazzucotelli).
Code Refactoring¤
- Explicit checks for subprocess runs (cc3ca2e by Timothée Mazzucotelli).
0.33.0 - 2023-08-16¤
Breaking Changes¤
- Removed
griffe.expressions.Expression
in favor ofgriffe.Expr
and subclasses - Removed
griffe.expressions.Name
in favor ofgriffe.ExprName
Features¤
- Add
-V
,--version
CLI flag to show version (a41515f by jgart). Issue #186, PR #187, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
Code Refactoring¤
0.32.3 - 2023-07-17¤
Bug Fixes¤
- Fix detecting whether an object should be an alias during inspection (6a63b37 by Timothée Mazzucotelli). Issue #180
Code Refactoring¤
- Improve log message when trying to stubs-merge objects of different kinds (d34a3ba by Timothée Mazzucotelli).
- De-duplicate stubs merging log message (cedc062 by Timothée Mazzucotelli).
0.32.2 - 2023-07-17¤
Bug Fixes¤
- Keep parentheses around tuples, except within subscripts (df6e636 by Timothée Mazzucotelli). Issue mkdocstrings/python#88
0.32.1 - 2023-07-15¤
Bug Fixes¤
- Fix aliases for direct nested imports (e9867f7 by Timothée Mazzucotelli). Issue mkdocstrings/python#32
Code Refactoring¤
- Simplify AST imports, stop using deprecated code from
ast
(21d5832 by Timothée Mazzucotelli). Issue #179
0.32.0 - 2023-07-13¤
Deprecations¤
- Classes
InspectorExtension
andVisitorExtension
are deprecated in favor ofExtension
. As a side-effect, thehybrid
extension is also deprecated. See how to use and write extensions.
Breaking Changes¤
- Module
griffe.agents.base
was removed - Module
griffe.docstrings.markdown
was removed - Class
ASTNode
was removed - Class
BaseInspector
was removed - Class
BaseVisitor
was removed - Function
get_parameter_default
was removed - Function
load_extension
was removed (made private) - Function
patch_ast
was removed - Function
tmp_worktree
was removed (made private) - Type
Extension
is now a class
Features¤
- Numpy parser: handle return section items with just type, or no name and no type (bdec37d by Michael Chow). Issue #173, PR #174, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
- Rework extension system (dea4c83 by Timothée Mazzucotelli).
- Parse attribute values, parameter defaults and decorators as expressions (7b653b3 by Timothée Mazzucotelli).
- Add loader option to avoid storing source code, reducing memory footprint (d592edf by Timothée Mazzucotelli).
- Add
extra
attribute to objects (707a348 by Timothée Mazzucotelli).
Bug Fixes¤
- Numpy-style: don't strip spaces from the left of indented lines (f13fc0a by Timothée Mazzucotelli). Discussion #587
- Fix relative paths for old versions when checking API (96fd45b by Timothée Mazzucotelli).
Performance Improvements¤
- Don't store source when dumping as JSON (d7f314a by Timothée Mazzucotelli).
- Stop caching properties on Object methods (15bdd74 by Timothée Mazzucotelli).
- Stop patching AST, use functions instead (7302f17 by Timothée Mazzucotelli). Issue #171
Code Refactoring¤
- Privatize/remove objects (fdeb16f by Timothée Mazzucotelli).
- Document public objects with
__all__
(db0e0e3 by Timothée Mazzucotelli). - Remove base visitor and inspector (bc446e4 by Timothée Mazzucotelli).
- Auto-register module in collection within loading helpers (591bacc by Timothée Mazzucotelli). Issue #177
0.31.0 - 2023-07-04¤
Breaking Changes¤
- Drop support for Python 3.7
- API changes:
GriffeLoader.resolve_aliases(only_exported)
: Deprecated parameter was removed and replaced byimplicit
(inverse semantics)GriffeLoader.resolve_aliases(only_known_modules)
: Deprecated parameter was removed and replaced byexternal
(inverse semantics)LinesCollection.tokens
: Public object was removed (Python 3.7)ASTNode.end_lineno
: Public object was removed (Python 3.7)griffe.agents.extensions
: Deprecated module was removed and replaced bygriffe.extensions
Features¤
- Add
--color
,--no-color
options to check subcommand (eac783c by Timothée Mazzucotelli).
Bug Fixes¤
- Report removed public modules (68906cb by Timothée Mazzucotelli).
Code Refactoring¤
- Improve check output (6b0a1f0 by Timothée Mazzucotelli).
- Remove deprecated
griffe.agents.extensions
module (b555c78 by Timothée Mazzucotelli). - Remove deprecated parameters from loader's
resolve_aliases
method (dd98acd by Timothée Mazzucotelli). - Drop Python 3.7 support (e4be30a by Timothée Mazzucotelli).
0.30.1 - 2023-07-02¤
Bug Fixes¤
- Prevent duplicate yields of breaking changes (9edef90 by Timothée Mazzucotelli). Issue #162
- Prevent alias resolution errors when checking for API breaking changes (93c964a by Timothée Mazzucotelli). Issue #145
- Handle Git errors when checking for API breaking changes (f9e8ba3 by Timothée Mazzucotelli). Issue #144
Code Refactoring¤
- Force remove worktree branch when done checking (45332ba by Timothée Mazzucotelli).
- Change command to obtain latest tag (f70f630 by Timothée Mazzucotelli).
0.30.0 - 2023-06-30¤
Features¤
- Add
allow_section_blank_line
option to the Numpy parser (245845e by Michael Chow). Issue #167, PR #168 - Support inheritance (08bbe09 by Timothée Mazzucotelli). PR #170
Bug Fixes¤
- Handle semi-colons in pth files (e2ec661 by Michael Chow). Issue #172, PR #175
Code Refactoring¤
0.29.1 - 2023-06-19¤
Bug Fixes¤
- Fix detection of optional and default in Numpydoc-style parameters (3509106 by Timothée Mazzucotelli). Issue #165
- Fallback to string literal when parsing fails with syntax error (53827c8 by Timothée Mazzucotelli). Issue mkdocstrings/python#80
- Don't mutate finder's import paths (a9e025a by Timothée Mazzucotelli).
- Respect
external
when expanding wildcards (8ef92c8 by Timothée Mazzucotelli). - Extract actual type for yielded/received values (3ea37ba by Timothée Mazzucotelli). Issue mkdocstrings/python#75
Code Refactoring¤
- Improve error handling when importing a module (a732e21 by Timothée Mazzucotelli).
- Improve tests helpers (accept all visit/inspection parameters) (6da5869 by Timothée Mazzucotelli).
- Allow passing a modules collection to the inspector, for consistency with the visitor (5f73a28 by Timothée Mazzucotelli).
- Always add import path of module to inspect when it has a file path (4021e6f by Timothée Mazzucotelli).
0.29.0 - 2023-05-26¤
Features¤
- Provide test helpers and pytest fixtures (611ed58 by Timothée Mazzucotelli).
0.28.2 - 2023-05-24¤
Bug Fixes¤
- Correctly resolve full expressions (fa57f4f by Timothée Mazzucotelli). Issue mkdocstrings/autorefs#23
- Use
full
attribute instead ofcanonical
for expressions (4338ccc by Michael Chow). Issue #163, PR #164
0.28.1 - 2023-05-22¤
Bug Fixes¤
Code Refactoring¤
- Refactor AST nodes parsers (7e53127 by Timothée Mazzucotelli). Issue #160
- Full expressions use canonical names (65c7184 by Timothée Mazzucotelli).
0.28.0 - 2023-05-17¤
Features¤
- Support scikit-build-core editable modules (partially) (eb64779 by Timothée Mazzucotelli). Issue #154
Bug Fixes¤
- Parse complex, stringified annotations (f743616 by Timothée Mazzucotelli). Issue #159
0.27.5 - 2023-05-12¤
Code Refactoring¤
- Represent function using their names when inspecting default values (9116c1f by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#180
0.27.4 - 2023-05-10¤
Bug Fixes¤
- Don't recurse through targets, get directly to final target and handle alias-related errors (c5bc197 by Timothée Mazzucotelli). Issue #155
Code Refactoring¤
- Follow
.pth
files to extend search paths with editable modules (79bf724 by Timothée Mazzucotelli). Issue #154 - Add default values to
_load_packages
helper (f104c20 by Timothée Mazzucotelli).
0.27.3 - 2023-05-05¤
Bug Fixes¤
- Allow setting docstring through alias (2e0f553 by Timothée Mazzucotelli).
- Prevent infinite recursion (0e98546 by Timothée Mazzucotelli). Issue #155
0.27.2 - 2023-05-03¤
Dependencies¤
- Remove async extra (aiofiles) (70d9b93 by Timothée Mazzucotelli).
Bug Fixes¤
- Support walrus operator (bf721f4 by Timothée Mazzucotelli). Issue #152
- Respect
ClassVar
annotation (60e01c1 by Victor Westerhuis). PR #150, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me - Add missing "other args" section aliases (f5c0a0e by Timothée Mazzucotelli).
Code Refactoring¤
- Move utils from cli to respective modules (c6ce49e by Timothée Mazzucotelli).
0.27.1 - 2023-04-16¤
Bug Fixes¤
- Actually parse warnings sections (bc00da5 by Timothée Mazzucotelli).
- Allow Raises and Warns items to start with a newline (f3b088c by Victor Westerhuis). PR #149, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
0.27.0 - 2023-04-10¤
Features¤
- Implement basic handling of Alias for breaking changes (aa8ce00 by Yurii). PR #140, Co-authored-by: Timothée Mazzucotelli pawamoy@pm.me
Bug Fixes¤
- Support
Literal
imported fromtyping_extensions
(3a16e58 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#545 - Fix parameter default checking logic and diff tests (1b940fd by Timothée Mazzucotelli).
0.26.0 - 2023-04-03¤
Breaking Changes¤
AliasResolutionError
instances don't have atarget_path
attribute anymore. It is instead replaced by analias
attribute which is a reference to anAlias
instance.- Lots of positional-or-keyword parameters were changed to keyword-only parameters.
Deprecations¤
- The
griffe.agents.extensions
module was moved togriffe.extensions
. The old path is deprecated.
Features¤
- Support newer versions of
editables
(ab7a3be by Timothée Mazzucotelli): the names of editable modules have changed from__editables_*
to_editable_impl_*
. - Provide a JSON schema (7dfed39 by Timothée Mazzucotelli).
- Allow hybrid extension to filter objects and run multiple inspectors (f8ff53a by Timothée Mazzucotelli).
- Allow loading extension from file path (131454e by Timothée Mazzucotelli).
- Add back
relative_filepath
which now really returns the filepath relative to the current working directory (40fe0c5 by Timothée Mazzucotelli).
Bug Fixes¤
- Fix JSON schema for ending line numbers (and add test) (318c6b4 by Timothée Mazzucotelli).
- Prevent cyclic aliases by not overwriting a module member with an indirect alias to itself (c188a95 by Timothée Mazzucotelli). Issue #122
- Prevent alias resolution errors when copying docstring or labels from previously existing attribute (48747b6 by Timothée Mazzucotelli).
- Fix Google admonition regular expression (ef0be5f by Timothée Mazzucotelli).
- Add back
griffe.agents.extensions
module (deprecated) (7129477 by Timothée Mazzucotelli). - Forward class attribute docstrings to instances (7bf4952 by Rodrigo Girão Serrão). Issue #128, PR #135
- Prevent errors related to getting attributes in the inspector (5d15d27 by Timothée Mazzucotelli).
- Catch "member does not exist" errors while expanding wildcards (a966022 by Timothée Mazzucotelli).
- Catch more inspection errors (4f6eef9 by Timothée Mazzucotelli).
Code Refactoring¤
- Log final path after resolving alias (c7ec7f7 by Timothée Mazzucotelli).
- Move extensions one level up (67ebd71 by Timothée Mazzucotelli).
- Set default
when
value on extension base classes (e8ad889 by Timothée Mazzucotelli). - Rename
relative_filepath
torelative_package_filepath
to better express what it does (6148f85 by Timothée Mazzucotelli). - Show file name and line number in alias resolution error messages (c48928d by Timothée Mazzucotelli).
0.25.5 - 2023-02-16¤
Bug Fixes¤
- Fix parsing empty lines with indentation in Google docstrings (705edff by Timothée Mazzucotelli). Issue #129
0.25.4 - 2023-01-19¤
Bug Fixes¤
- Fix creation of aliases to modules when inspecting (54242cb by Timothée Mazzucotelli).
- Support (setuptools) editable packages with multiple roots (bd37dfb by Gilad). PR #126
0.25.3 - 2023-01-04¤
Bug Fixes¤
- Fix parsing of annotations in Numpy attributes sections (18fa396 by Timothée Mazzucotelli). Issue #72
0.25.2 - 2022-12-24¤
Bug Fixes¤
- Make sure passage through aliases is reset (79733f4 by Timothée Mazzucotelli). Issue #123
- Ignore cyclic alias errors when updating target aliases (bb62b2f by Timothée Mazzucotelli). Issue #123
0.25.1 - 2022-12-20¤
Bug Fixes¤
- Pass through aliases earlier to prevent infinite recursion (e533f29 by Timothée Mazzucotelli). Issue #83, #122
0.25.0 - 2022-12-11¤
Breaking changes¤
- Parameter
only_known_modules
was renamedexternal
in theexpand_wildcards()
method of the loader. - Exception
UnhandledEditablesModuleError
was renamedUnhandledEditableModuleError
since we now support editable installation from other packages thaneditables
.
Highlights¤
- Properties are now fetched as attributes rather than functions, since that is how they are used. This was asked by users, and since Griffe generates signatures for Python APIs (emphasis on APIs), it makes sense to return data that matches the interface provided to users. Such property objects in Griffe's output will still have the associated
property
labels of course. - Lots of bug fixes. These bugs were discovered by running Griffe on many major packages as well as the standard library (again). Particularly, alias resolution should be more robust now, and should generate less issues like cyclic aliases, meaning indirect/wildcard imports should be better understood. We still highly discourage the use of wildcard imports
Features¤
- Support
setuptools
editable modules (abc18f7 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#463 - Support merging stubs on wildcard imported objects (0ed9c36 by Timothée Mazzucotelli). Issue #116
Bug Fixes¤
- Prevent cyclic alias creation when expanding wildcards (a77e4e8 by Timothée Mazzucotelli).
- Don't crash and show hint when wildcard expansion fails (336faf6 by Timothée Mazzucotelli).
- Register top module after inspection (86454ec by Timothée Mazzucotelli).
- Set alias attributes early (2ac1a9b by Timothée Mazzucotelli).
- Allow writing attributes on aliases (c8f736e by Timothée Mazzucotelli).
- Don't crash on inspection of functions signatures (051e337 by Timothée Mazzucotelli).
- Don't crash on inspection of method descriptors' docstrings (09571bb by Timothée Mazzucotelli).
- Fix stats computing (handle stubs and namespace packages) (a81f8dc by Timothée Mazzucotelli).
- Support documenting multiple items for optional tuples (727456d by Timothée Mazzucotelli). Issue #117
- Fix comparing names with strings (37ae0a2 by Timothée Mazzucotelli). Issue #114
- Fix deepcopy crashing because of
__getattr__
(11b023b by Timothée Mazzucotelli). Issue #73, PR #119
Code Refactoring¤
- Prevent reloading of failed modules (8ef14ab by Timothée Mazzucotelli).
- Rename
only_known_modules
parameter toexternal
(5f816c6 by Timothée Mazzucotelli). - Rework alias creation decision in the inspector (f434943 by Timothée Mazzucotelli).
- Resolve alias chain recursively (6cdd3b2 by Timothée Mazzucotelli).
- Don't try to stubs-merge identical modules (7099971 by Timothée Mazzucotelli).
- Load properties as attributes (5c97a45 by Timothée Mazzucotelli). Issue mkdocstrings/python#9
- Use a cyclic relationship map for inspection (9a2a711 by Timothée Mazzucotelli). PR #115
0.24.1 - 2022-11-18¤
Bug Fixes¤
- Support nested namespace packages (d571f8f by Timothée Mazzucotelli).
0.24.0 - 2022-11-13¤
The "Breaking Changes" and "Deprecations" sections are proudly written with the help of our new API breakage detection feature ! Many thanks to Talley Lambert (@tlambert03) for the initial code allowing to compare two Griffe trees.
Breaking Changes¤
- All parameters of the
load_git
function, exceptmodule
, are now keyword-only. - Parameter
try_relative_path
of theload_git
function was removed. - Parameter
commit
was renamedref
in theload_git
function. - Parameter
commit
was renamedref
in thetmp_worktree
helper, which will probably become private later. - Parameters
ref
andrepo
switched positions in thetmp_worktree
helper. - All parameters of the
resolve_aliases
method are now keyword-only. - Parameters
only_exported
andonly_known_modules
of theresolve_module_aliases
method were removed. This method is most probably not used by anyone, and will probably be made private in the future.
Deprecations¤
-
Parameters
only_exported
andonly_known_modules
of theresolve_aliases
method are deprecated in favor of their inverted counter-partimplicit
andexternal
parameters.- Example before:
loader.resolve_aliases(only_exported=True, only_known_modules=True)
- Example after:
loader.resolve_aliases(implicit=False, external=False)
- Example before:
Features¤
- Add CLI command to check for API breakages (90bded4 by Timothée Mazzucotelli). Issue #75, PR #105
- Add function to find API breaking changes (a4f1280 by Talley Lambert and Timothée Mazzucotelli). Issue #75, PR #105
Bug Fixes¤
- Fix labels mismatch staticmethod-classmethod in inspector (25060f6 by Timothée Mazzucotelli). Issue #111
- Prevent infinite loop while looking for package's parent folder (f297f1a by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#72
- Fix comparing names and expressions (07bffff by Timothée Mazzucotelli).
Code Refactoring¤
- Rename some parameters in Git module (9ad7a2c by Timothée Mazzucotelli).
- Set parameters as keyword-only (44c01be by Timothée Mazzucotelli).
- Remove stars from parameters names (91dce14 by Timothée Mazzucotelli).
- Refactor CLI to use subcommands (760b091 by Timothée Mazzucotelli). PR #110
- Rename parameters used when resolving aliases (3d3a4eb by Timothée Mazzucotelli).
0.23.0 - 2022-10-26¤
Features¤
Bug Fixes¤
- Log debug instead of errors when failing to parse NumPy annotations for additional sections (568ff60 by Sigurd Spieckermann). Issue #93, PR #109
- Don't strip too many parentheses around a call node (bb5c5e7 by Timothée Mazzucotelli). PR #107
- Guard against more alias resolution errors (2be135d by Timothée Mazzucotelli). Issue #83, PR #103
0.22.2 - 2022-09-24¤
Bug Fixes¤
- Log debug instead of errors when failing to parse Numpy annotations (75eeeda by Timothée Mazzucotelli). Issue #93
- Don't crash on unsupported module names (containing dots) (6a57194 by Timothée Mazzucotelli). Issue #94
- Show correct docstring line numbers on Python 3.7 (edd4b6d by Timothée Mazzucotelli). Issue #98
- Fix parsing of Numpy docstring with an Examples section at the end (3114727 by Timothée Mazzucotelli). Issue #97
- Don't crash on unsupported item in
__all__
(log a warning instead) (9e5df0a by Timothée Mazzucotelli). Issue #92 - Prevent infinite recursion while expanding exports (68446f7 by Timothée Mazzucotelli).
- Add missing check while expanding wildcards (7e816ed by Timothée Mazzucotelli).
0.22.1 - 2022-09-10¤
Bug Fixes¤
0.22.0 - 2022-06-28¤
Features¤
Code Refactoring¤
- Safely parse annotations and values (b023e2b by Timothée Mazzucotelli).
0.21.0 - 2022-06-25¤
Features¤
- Add
load_git
function allowing to load data from a specific git ref (b2c3946 by Talley Lambert). Issue #75, PR #76
Bug Fixes¤
- Fix detecting and merging stubs for single-file packages (6a82542 by Talley Lambert). Issue #77, PR #78
- Fix parsing ExtSlice nodes when getting values (b2fe968 by Timothée Mazzucotelli). Issue #87
- Don't trigger alias resolution when merging stubs (2b88627 by Timothée Mazzucotelli). Issue #89
- Fix handling of .pth files (f212dd3 by Gabriel Dugny). Issue #84, PR #85
0.20.0 - 2022-06-03¤
Features¤
Bug Fixes¤
- Fix unparsing of f-strings (9ca74bd by Timothée Mazzucotelli). Issue #80
- Don't crash when overwriting a submodule with a wildcard imported attribute (bfad1cc by Timothée Mazzucotelli). Issue #72, #79, mkdocstrings/mkdocstrings#438
0.19.3 - 2022-05-26¤
Bug Fixes¤
0.19.2 - 2022-05-18¤
Bug Fixes¤
- Don't crash on single line docstrings with trailing whitespace (Google) (8d9ccd5 by Timothée Mazzucotelli).
0.19.1 - 2022-05-07¤
Bug Fixes¤
0.19.0 - 2022-05-06¤
Features¤
- Add
load
shortcut function for convenience (f38a42d by Timothée Mazzucotelli). - Support loading (and merging)
*.pyi
files (41518f4 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#404 - Improve support for call nodes in annotations (45e5bf5 by Timothée Mazzucotelli). Issue #66
- Support
dataclass
decorators on classes (f579431 by Timothée Mazzucotelli).
Code Refactoring¤
- Handle absence of values (190585d by Timothée Mazzucotelli).
- Simplify decorators to labels function (04e768f by Timothée Mazzucotelli).
- Always sort labels when serializing (bd2504b by Timothée Mazzucotelli).
0.18.0 - 2022-04-19¤
Features¤
- Add CLI option to disallow inspection (8f71a07 by Timothée Mazzucotelli).
- Support complex
__all__
assignments (9a2128b by Timothée Mazzucotelli). Issue #40 - Inherit class parameters from
__init__
method (e195593 by François Rozet). Issue mkdocstrings/python#19, PR #65. It allows to write "Parameters" sections in the docstring of the class itself.
Performance Improvements¤
- Avoid using
__len__
as boolean method (d465493 by Timothée Mazzucotelli).
Bug Fixes¤
- Don't crash on unhandle
__all__
assignments (cbc103c by Timothée Mazzucotelli). - Handle empty packages names in CLI (52b51c4 by Timothée Mazzucotelli).
- Don't crash on Google parameters sections found in non-function docstrings (4a417bc by Timothée Mazzucotelli). Issue mkdocstrings/python#19
Code Refactoring¤
- Improve "unknown parameter" messages (7191799 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#423
- Set property label on
@cached_property
-decorated methods (bc068f8 by Timothée Mazzucotelli).
0.17.0 - 2022-04-15¤
Features¤
- Handle properties setters and deleters (50a4490 by Timothée Mazzucotelli).
- Handle
typing.overload
decorator (927bbd9 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#308 - Set labels on functions using decorators (1c1feb2 by Timothée Mazzucotelli). Issue #47
- Add
runtime
attribute to objects/aliases and handle type guarded objects (2f2a04e by Timothée Mazzucotelli). Issue #42 - Support pkg-style namespace packages (efba0c6 by Timothée Mazzucotelli). Issue #58
Code Refactoring¤
- Remove useless attribute (c4a92b7 by Timothée Mazzucotelli).
- Improve Google warnings (641089a by Timothée Mazzucotelli).
- Remove useless import nodes generic visits (f83fc8e by Timothée Mazzucotelli).
0.16.0 - 2022-04-09¤
Features¤
- Warn about unknown parameters in Numpy docstrings (23f63f2 by Timothée Mazzucotelli).
- Warn about unknown parameters in Google docstrings (72be993 by Kevin Musgrave). Issue mkdocstrings/mkdocstrings#408, PR #63
Bug Fixes¤
- Don't crash on unhandled AST nodes while parsing text annotations (f3be3a6 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#416
0.15.1 - 2022-04-08¤
Bug Fixes¤
- Don't overwrite existing (lower) members when expanding wildcards (9ff86e3 by Timothée Mazzucotelli).
- Don't insert admonition before current section (Google parser) (8d8a46f by Timothée Mazzucotelli).
- Handle aliases chains in
has_docstrings
method (77c6943 by Timothée Mazzucotelli). - Actually check for docstrings recursively (15f4193 by Timothée Mazzucotelli).
0.15.0 - 2022-04-03¤
Features¤
- Support
ignore_init_summary
in Numpy parser (f8cd147 by Timothée Mazzucotelli). Issue #44 - Enable cross-references for Numpy docstrings annotations (e32a73c by Timothée Mazzucotelli). Issues #11, #12, #13, #14, #15, #16, #17, #18
- Retrieve annotations from parent in Numpy parser (8d4eae3 by Timothée Mazzucotelli). Issues #29, #30, #31, #32
- Parse annotations in Iterator/Generator for Google docstrings (f0129ef by Timothée Mazzucotelli). Issue #28
Bug Fixes¤
- Fix missing "receives" entry in Google parser (35d63fb by Timothée Mazzucotelli).
- Fix serialization of Windows paths (b7e8da8 by Timothée Mazzucotelli).
Code Refactoring¤
- Be less strict on spacing around ":" in Numpy docstrings (aa592b5 by Timothée Mazzucotelli).
- Be less strict in Numpy regular expressions (603dc0e by Timothée Mazzucotelli).
- Rename variables in Numpy module (4407244 by Timothée Mazzucotelli).
0.14.1 - 2022-04-01¤
Bug Fixes¤
- Retrieve default value for non-string parameters (15952ed by ThomasPJ). Issue #59, issue mkdocstrings/python#8, PR #60
- Prevent infinite recursion while expanding wildcards (428628f by Timothée Mazzucotelli). Issue #57
0.14.0 - 2022-03-06¤
Features¤
0.13.2 - 2022-03-01¤
Bug Fixes¤
- Fix type regex in Numpy parser (3a10fda by Timothée Mazzucotelli).
- Current module must not be available in its members' scope (54f9688 by Timothée Mazzucotelli).
- Allow named sections after numpydoc examples (a44d9c6 by Lucina). PR #54
0.13.1 - 2022-02-24¤
Bug Fixes¤
- Don't cut through wildcard-expanded aliases chains (65dafa4 by Timothée Mazzucotelli).
- Fix docstrings warnings when there's no parent module (e080549 by Timothée Mazzucotelli). Issue #51
Code Refactoring¤
- Use proper classes for docstrings sections (46eddac by Timothée Mazzucotelli). Issue mkdocstrings/python#3, PR #52
0.13.0 - 2022-02-23¤
Features¤
- Implement
trim_doctest_flags
for Google and Numpy (8057153 by Jeremy Goh). Issue mkdocstrings/mkdocstrings#386, PR #48
Bug Fixes¤
- Rename keyword parameters to keyword arguments (ce3eb6b by Jeremy Goh).
0.12.6 - 2022-02-18¤
Bug Fixes¤
0.12.5 - 2022-02-17¤
Bug Fixes¤
- Fix getting line numbers on aliases (351750e by Timothée Mazzucotelli).
0.12.4 - 2022-02-16¤
Bug Fixes¤
- Update target path when changing alias target (5eda646 by Timothée Mazzucotelli).
- Fix relative imports to absolute with wildcards (69500dd by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#382
- Fix accessing members using tuples (87ff1df by Timothée Mazzucotelli).
- Fix recursive wildcard expansion (60e6edf by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#382
- Only export submodules if they were imported (98c72db by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#382
0.12.3 - 2022-02-15¤
Bug Fixes¤
- Always decode source as UTF8 (563469b by Timothée Mazzucotelli).
- Fix JSON encoder and decoder (3e768d6 by Timothée Mazzucotelli).
Code Refactoring¤
- Improve error handling (7b15a51 by Timothée Mazzucotelli).
0.12.2 - 2022-02-13¤
Bug Fixes¤
- Fix JSON unable to serialize docstring kind values (91e6719 by Timothée Mazzucotelli).
Code Refactoring¤
- Make attribute labels more explicit (19eac2e by Timothée Mazzucotelli).
0.12.1 - 2022-02-12¤
Features¤
- Add
ignore_init_summary
option to the Google parser (81f0333 by Timothée Mazzucotelli). - Add
is_KIND
properties on objects (17a08cd by Timothée Mazzucotelli).
0.11.7 - 2022-02-12¤
Bug Fixes¤
- Keep only first assignment in conditions (0104440 by Timothée Mazzucotelli).
- Support invert unary op in annotations (734ef55 by Timothée Mazzucotelli).
- Fix handling of missing modules during dynamic imports (7a3b383 by Timothée Mazzucotelli). Issue mkdocstrings/mkdocstrings#380
- Fix getting lines of compiled modules (899461b by Timothée Mazzucotelli).
Code Refactoring¤
- Get annotation with the same property on functions (ecc7bba by Timothée Mazzucotelli).
0.11.6 - 2022-02-10¤
Bug Fixes¤
0.11.5 - 2022-02-08¤
Bug Fixes¤
- Fix building title and kind of Google admonitions (87ab56c by Timothée Mazzucotelli). Issue mkdocstrings#379
0.11.4 - 2022-02-07¤
Bug Fixes¤
- Don't trigger alias resolution while checking docstrings presence (dda72ea by Timothée Mazzucotelli). Issue #37
0.11.3 - 2022-02-05¤
Bug Fixes¤
- Fix getting params defaults on Python 3.7 (0afd867 by Timothée Mazzucotelli).
0.11.2 - 2022-02-03¤
Code Refactoring¤
- Factorize docstring annotation parser (19609be by Timothée Mazzucotelli).
0.11.1 - 2022-02-01¤
Code Refactoring¤
- Rename RST parser to Sphinx (a612cb1 by Timothée Mazzucotelli).
0.11.0 - 2022-01-31¤
Features¤
- Support matrix multiplication operator in visitor (6129e17 by Timothée Mazzucotelli).
Bug Fixes¤
- Fix name resolution for inspected data (ed3e7e5 by Timothée Mazzucotelli).
- Make importer actually able to import any nested object (d007219 by Timothée Mazzucotelli).
Code Refactoring¤
- Always use search paths to import modules (a9a378f by Timothée Mazzucotelli).
- Split out module finder (7290642 by Timothée Mazzucotelli).
0.10.0 - 2022-01-14¤
Bug Fixes¤
- Fix infinite recursion errors in alias resolver (133b4e4 by Timothée Mazzucotelli).
- Fix inspection of nodes children (aliases or not) (bb354f2 by Timothée Mazzucotelli).
- Fix relative to absolute import conversion (464c39e by Timothée Mazzucotelli).
Code Refactoring¤
- Rename some CLI options (1323268 by Timothée Mazzucotelli).
- Return the loader the to main function (9c6317e by Timothée Mazzucotelli).
- Improve logging messages (b8eb16e by Timothée Mazzucotelli).
- Skip inspection of some debug packages (4ee8968 by Timothée Mazzucotelli).
- Return ... instead of Ellipsis (f9ae31d by Timothée Mazzucotelli).
- Catch attribute errors when cross-referencing docstring annotations (288803a by Timothée Mazzucotelli).
- Support dict methods in lines collection (1b0cb94 by Timothée Mazzucotelli).
Features¤
- Compute and show some stats (1b8d0a1 by Timothée Mazzucotelli).
- Add CLI options for alias resolution (87a59cb by Timothée Mazzucotelli).
- Support Google raises annotations cross-refs (8006ae1 by Timothée Mazzucotelli).
0.9.0 - 2022-01-04¤
Features¤
- Loader option to only follow aliases in known modules (879d91b by Timothée Mazzucotelli).
- Use aliases when inspecting too (60439ee by Timothée Mazzucotelli).
Bug Fixes¤
- Handle more errors when loading modules (1aa571a by Timothée Mazzucotelli).
- Handle more errors when getting signature (2db85e7 by Timothée Mazzucotelli).
- Fix checking parent truthfulness (6129e50 by Timothée Mazzucotelli).
- Fix getting subscript value (1699f12 by Timothée Mazzucotelli).
- Support yield nodes (7d536d5 by Timothée Mazzucotelli).
- Exclude some special low-level members that cause cyclic issues (b54ab34 by Timothée Mazzucotelli).
- Fix transforming elements of signatures to annotations (e278c11 by Timothée Mazzucotelli).
- Detect cyclic aliases and prevent resolution errors (de5dd12 by Timothée Mazzucotelli).
- Don't crash while trying to get the representation of an attribute value (77ac55d by Timothée Mazzucotelli).
- Fix building value for joined strings (6154b69 by Timothée Mazzucotelli).
- Fix prevention of cycles while building objects nodes (48062ac by Timothée Mazzucotelli).
- Better handle relative imports (91b42de by Timothée Mazzucotelli).
- Fix Google parser missing lines ending with colon (2f7969c by Timothée Mazzucotelli).
Code Refactoring¤
- Improve alias resolution robustness (e708139 by Timothée Mazzucotelli).
- Remove async loader for now (acc5ecf by Timothée Mazzucotelli).
- Improve handling of Google admonitions (8aa5ed0 by Timothée Mazzucotelli).
- Better handling of import errors and system exits while inspecting modules (7ba1589 by Timothée Mazzucotelli).
- Empty generic visit/inspect methods in base classes (338760e by Timothée Mazzucotelli).
0.8.0 - 2022-01-02¤
Features¤
- Support getting attribute annotation from parent in RST docstring parser (25db61a by Timothée Mazzucotelli).
- Handle relative imports (62b0927 by Timothée Mazzucotelli).
- Support wildcard imports (77a3cb7 by Timothée Mazzucotelli).
- Support configuring log level (CLI/env var) (839d78e by Timothée Mazzucotelli).
- Support loading
*.py[cod]
and*.so
modules (cd98a6f by Timothée Mazzucotelli). - Support inspecting builtin functions/methods (aa1fce3 by Timothée Mazzucotelli).
Code Refactoring¤
- Handle extensions errors (11278ca by Timothée Mazzucotelli).
- Don't always try to find a module as a relative path (e6df277 by Timothée Mazzucotelli).
- Improve loggers patching (f4b262a by Timothée Mazzucotelli).
- Improve dynamic imports (2998195 by Timothée Mazzucotelli).
0.7.1 - 2021-12-28¤
Code Refactoring¤
- Only log warning if async mode is used (356e848 by Timothée Mazzucotelli).
0.7.0 - 2021-12-28¤
Features¤
- Support more nodes on Python 3.7 (7f2c4ec by Timothée Mazzucotelli).
Code Refactoring¤
- Don't crash on syntax errors and log an error (10bb6b1 by Timothée Mazzucotelli).
0.6.0 - 2021-12-27¤
Features¤
- Support more AST nodes (cd1b305 by Timothée Mazzucotelli).
Code Refactoring¤
- Use annotation getter for base classes (8b1a7ed by Timothée Mazzucotelli).
0.5.0 - 2021-12-20¤
Features¤
- Add support for Python 3.7 (4535adc by Timothée Mazzucotelli).
Bug Fixes¤
- Don't propagate aliases of an alias (8af48f8 by Timothée Mazzucotelli).
- Don't reassign members defined in except clauses (d918b4e by Timothée Mazzucotelli).
0.4.0 - 2021-11-28¤
Features¤
- Add a prototype 'hybrid' extension (8cb3c16 by Timothée Mazzucotelli).
- Allow passing extensions config as JSON on the CLI (9a7fa8b by Timothée Mazzucotelli).
- Support names for returns, yields and receives sections items (1c5a4c9 by Timothée Mazzucotelli).
- Store aliases on each object (91ba643 by Timothée Mazzucotelli).
- Support inspection/introspection (3a0587d by Timothée Mazzucotelli).
- Support multiple return, yield and receive items (0fc70cb by Timothée Mazzucotelli).
- Support namespace packages (2414c8e by Timothée Mazzucotelli).
Bug Fixes¤
- Fix extensions loader (78fb70b by Timothée Mazzucotelli).
- Avoid visiting/inspecting multiple times (75a8a8b by Timothée Mazzucotelli).
- Set modules collection attribute earlier (592c0bd by Timothée Mazzucotelli).
- Support inequality nodes (b0ed247 by Timothée Mazzucotelli).
- Handle Div nodes for values (272e4d6 by Timothée Mazzucotelli).
Code Refactoring¤
- Set log level to INFO (718e73e by Timothée Mazzucotelli).
- Add target setter (7f0064c by Timothée Mazzucotelli).
- Reorganize conditions (15ab876 by Timothée Mazzucotelli).
- Avoid recursion loops (ea6acec by Timothée Mazzucotelli).
- Update aliases when replacing a member (99a0f8b by Timothée Mazzucotelli).
- Reorganize code (31fcdb1 by Timothée Mazzucotelli).
- Replace DocstringException with DocstringRaise (d5ed87a by Timothée Mazzucotelli).
- Refactor loaders (d9b94bb by Timothée Mazzucotelli).
- Improve typing (e08bcfa by Timothée Mazzucotelli).
0.3.0 - 2021-11-21¤
Features¤
- Handle aliases and their resolution (67ae903 by Timothée Mazzucotelli).
- Resolve annotations in docstrings (847384a by Timothée Mazzucotelli).
- Resolve annotations (6451eff by Timothée Mazzucotelli).
- Add lines property to objects (7daf7db by Timothée Mazzucotelli).
- Allow setting docstring parser and options on each object (07a1d2e by Timothée Mazzucotelli).
- Get attributes annotations from parent (003b990 by Timothée Mazzucotelli).
- Draft extensions loader (17ccd03 by Timothée Mazzucotelli).
- Add properties to objects (0ec301a by Timothée Mazzucotelli).
- Handle .pth files when searching modules (2a2e182 by Timothée Mazzucotelli).
- Add
default
property to docstring parameters (6298ba3 by Timothée Mazzucotelli). - Accept RST and Numpy parsers (1cf147d by Timothée Mazzucotelli).
- Support data (attributes/variables) (dce84d1 by Timothée Mazzucotelli).
- Add Numpy-style parser (ad5b72d by Timothée Mazzucotelli).
- Support more section kinds in Google-style (9d3d047 by Timothée Mazzucotelli).
- Add docstring section kinds (b270483 by Timothée Mazzucotelli).
- Accept initial arguments when creating container (90c5956 by Timothée Mazzucotelli).
- Add an RST-style docstring parser (742e7b2 by Timothée Mazzucotelli).
Performance Improvements¤
- Improve JSON encoder perfs (6a78eb0 by Timothée Mazzucotelli).
Bug Fixes¤
- Handle serialization of Posix paths (3a66b95 by Timothée Mazzucotelli).
- Fix list annotation getter (5ae800a by Timothée Mazzucotelli).
- Show accurate line number in Google warnings (2953590 by Timothée Mazzucotelli).
- Fix assignment names getters (6990846 by Timothée Mazzucotelli).
- Fix async loader (passing parent) (57e866e by Timothée Mazzucotelli).
- Fix exception name (4b8b85d by Timothée Mazzucotelli).
- Fix Google sections titles logic (87dd329 by Timothée Mazzucotelli).
- Prepend current module to base classes (still needs resolution) (a4b1dee by Timothée Mazzucotelli).
- Fix Google admonition regex (3902e74 by Timothée Mazzucotelli).
- Fix docstring getter (1442eba by Timothée Mazzucotelli).
- Fix getting arguments defaults in the Google-style parser (67adbaf by Timothée Mazzucotelli).
- Fix getting arguments annotations in the Google-style parser (8bcbfba by Timothée Mazzucotelli).
Code Refactoring¤
- Export parsers and main function in docstrings module (96469da by Timothée Mazzucotelli).
- Remove top exports (cd76694 by Timothée Mazzucotelli).
- Reorganize exceptions (7f9b805 by Timothée Mazzucotelli).
- Avoid circular import (ef27dcd by Timothée Mazzucotelli).
- Rename index to [new] offset (c07cc7d by Timothée Mazzucotelli).
- Reorganize code (5f4fff2 by Timothée Mazzucotelli).
- Use keyword only parameters (d34edd6 by Timothée Mazzucotelli).
- Default to no parsing for serialization (8fecd9e by Timothée Mazzucotelli).
- Always extend AST (c227ae6 by Timothée Mazzucotelli).
- Set default for kwargs parameters (7a0b85e by Timothée Mazzucotelli).
- Rename visitor method (3e0c43c by Timothée Mazzucotelli).
- Improve typing (ac86f17 by Timothée Mazzucotelli).
- Fix typo (a9ed6e9 by Timothée Mazzucotelli).
- Rewrite ParameterKind (90249df by Timothée Mazzucotelli).
- Add bool methods to docstrings and objects (548f72e by Timothée Mazzucotelli).
- Allow setting docstring parser and options on each docstring (752e084 by Timothée Mazzucotelli).
- Skip attribute assignments (e9cc2cd by Timothée Mazzucotelli).
- Improve visitor getters (2ea88c0 by Timothée Mazzucotelli).
- Use relative filepath in docstring warnings (e894df7 by Timothée Mazzucotelli).
- Set submodules parent earlier (53767c0 by Timothée Mazzucotelli).
- Rename Data to Attribute (febc12e by Timothée Mazzucotelli).
- Rename arguments to parameters (957856c by Timothée Mazzucotelli).
- Improve annotation support (5b2262f by Timothée Mazzucotelli).
- Always set parent (cae85de by Timothée Mazzucotelli).
- Factorize function handling (dfece1c by Timothée Mazzucotelli).
- Privatize stuff, fix loggers (5513ed5 by Timothée Mazzucotelli).
- Use keyword only arguments (e853fe9 by Timothée Mazzucotelli).
- Set default values for Argument arguments (d5cccaa by Timothée Mazzucotelli).
- Swallow extra parsing options (3d9ebe7 by Timothée Mazzucotelli).
- Rename
start_index
argument tooffset
(dd88358 by Timothée Mazzucotelli). - Reuse parsers warn function (03dfdd3 by Timothée Mazzucotelli).
0.2.0 - 2021-09-25¤
Features¤
- Add Google-style docstring parser (cdefccc by Timothée Mazzucotelli).
- Support all kinds of functions arguments (c177562 by Timothée Mazzucotelli).
- Initial support for class decorators and bases (8e229aa by Timothée Mazzucotelli).
- Add functions decorators support (fee304d by Timothée Mazzucotelli).
- Add async loader (3218bd0 by Timothée Mazzucotelli).
- Add relative file path and package properties (d26ee1f by Timothée Mazzucotelli).
- Add search and output option to the CLI (3b37692 by Timothée Mazzucotelli).
- Load docstrings and functions arguments (cdf29a3 by Timothée Mazzucotelli).
- Support paths in loader (8f4df75 by Timothée Mazzucotelli).
Performance Improvements¤
- Avoid name lookups in visitor (00de148 by Timothée Mazzucotelli).
- Factorize and improve main and extensions visitors (9b27b56 by Timothée Mazzucotelli).
- Delegate children computation at runtime (8d54c87 by Timothée Mazzucotelli).
- Cache dataclasses properties (2d7447d by Timothée Mazzucotelli).
- Optimize node linker (03f955e by Timothée Mazzucotelli).
- Optimize docstring getter (4a05516 by Timothée Mazzucotelli).