Adam Turner
66905d24e1
Use strict flake8-type-checking settings in Ruff
2025-01-13 21:56:36 +00:00
Adam Turner
dec45eaf28
Bump Ruff to 0.9.0
2025-01-10 13:50:26 +00:00
Adam Turner
d59084a1fa
Bump Ruff to 0.8.6
2025-01-06 06:05:55 +00:00
Adam Turner
00ad109a39
Run Ruff on `tests/roots/
`
2025-01-03 01:33:14 +00:00
Adam Turner
34f5a8d503
Avoid using camelCase names in autodoc tests
2024-12-09 14:59:25 +00:00
Adam Turner
d03156e078
Format `tests/
` ( #12760 )
2024-08-11 14:58:56 +01:00
Adam Turner
2bd973e719
autodoc: Fix warnings with dataclasses in `Annotated
` metadata ( #12622 )
2024-07-20 11:28:03 +01:00
Bénédikt Tran
da0733b338
[autodoc] fix rendering of enumerations inheriting from mixin and data types ( #11596 )
2024-03-21 12:36:36 +01:00
Bénédikt Tran
c86e90842f
[autodoc] add support for singledispatchmethod class methods ( #11284 )
2024-03-14 12:26:35 +01:00
MatrixEditor
182053198d
Added support for `slice
` objects in subscriptions ( #11981 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-02-14 14:45:30 +01:00
j-carson
cd2bf0a7e5
#11917 - Fix rendering of inherited members for Python 3.9 ( #11919 )
...
Co-authored-by: j-carson <j-carson@fastmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-02-03 10:46:13 +01:00
Bénédikt Tran
76658c49a9
Fix `sphinx.ext.autodoc.preserve_defaults
` ( #11550 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 01:19:25 +00:00
picnixz
2656f34848
Fix rendering of `Literal
` annotations with enum values ( #11517 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-14 23:33:57 +01:00
Adam Turner
ad61e41157
Drop support for Python 3.8 ( #11511 )
2023-07-25 02:07:23 +01:00
picnixz
aba392d87f
Support type comments in `PropertyDocumenter
` ( #11298 )
2023-04-06 22:56:17 +01:00
Adam Turner
4032070e81
Run pyupgrade ( #11070 )
2023-01-02 00:01:14 +00:00
Adam Turner
f4c8a0a68e
Insert `from __future__ import annotations
`
2023-01-01 20:48:37 +00:00
Adam Turner
920828fe35
Run the `pyupgrade
` tool
2022-10-17 22:39:09 +01:00
Adam Turner
4660b62de0
Drop Python 3.7
2022-09-27 18:31:47 +01:00
danieleades
12bff8a273
Remove unneeded noqa
lint suppression comments ( #10772 )
2022-08-28 20:03:17 +01:00
Takeshi KOMIYA
29edce9243
test: Add testcase for autodoc_inherit_docstring and attributes (refs: #10539 )
2022-06-14 02:49:07 +09:00
Anselm Kruis
336885c4e2
Add test cases for #8180
...
The test checks, if ":meta private:" and ":meta public:" have an effect
in attributes of a class. Currently the new test cases fail.
The fix is in the next commit.
2022-05-23 02:04:03 +09:00
Takeshi KOMIYA
92fcac321b
test: Add *args and **kwargs to testcase of target.typehints
2022-05-15 19:05:17 +09:00
Takeshi KOMIYA
e770e2567f
Merge pull request #10427 from tk0miya/10421_autodoc_preserve_defaults_for_classmethod
...
Fix #10421 : autodoc_preserve_defaults doesn't work on class methods
2022-05-08 23:19:10 +09:00
Takeshi KOMIYA
10dd5a0e43
Fix #10421 : autodoc_preserve_defaults doesn't work on class methods
2022-05-08 22:59:14 +09:00
Takeshi KOMIYA
7134317e49
Merge remote-tracking branch 'origin/5.x' into HEAD
2022-05-07 22:37:58 +09:00
Takeshi KOMIYA
a66adb1c32
Fix #10305 : autodoc: Failed to extract optional forwardrefs
...
Autodoc fails to extract optional forwardrefs (ex. `Optional[MyClass]`)
even if `MyClass` is declared in `autodoc_type_aliases`.
2022-04-17 03:09:11 +09:00
zuqq
a450518bb1
Apply autodoc_typehints_format
to all type hints
...
Specifically: attributes, data, properties, and type variable bounds.
2022-04-08 20:27:24 +01:00
Takeshi KOMIYA
f5b3804060
Merge pull request #10285 from jmp1985/master
...
Fixed singledispatch documentation
2022-04-05 02:30:53 +09:00
James Parkhurst
88b213bbf0
Added test case
2022-04-04 11:45:58 +01:00
Takeshi KOMIYA
21e3a96f09
Close #8417 : autodoc: :inherited-members: option now takes multiple classes
...
It allows to suppress inherited members of several classes on the module at
once by specifying the option to `automodule` directive
2022-04-03 20:17:41 +09:00
Takeshi KOMIYA
0d31fc9614
Merge branch '5.x' into 10266_autodoc_preserve_defaults_crashes_on_kwonlyargs_without_defaults
2022-04-03 16:57:32 +09:00
Takeshi KOMIYA
a78c07ca07
Fix #10280 : autodoc_docstring_signature generates needless return typehint
...
Basically, autodoc suppresses return value typehint for class
constructors. But it was unexpectedly shown if
`autodoc_docstring_signature` is enabled and docstring has multiple
signatures.
2022-04-03 16:32:35 +09:00
Takeshi KOMIYA
f5e4e70817
Fix #10266 : autodoc_preserve_defaults crashes on kwonlyargs w/o defaults
2022-04-02 16:55:48 +09:00
Takeshi KOMIYA
3fc98a2b3d
Fix #10027 : autodoc_typehints_format does not work with :show-inheritance:
2022-01-01 18:06:57 +09:00
Takeshi KOMIYA
f88ac53e51
Fix #9883 : autodoc: doccomment for the alias to mocked object was ignored
2021-11-29 02:06:16 +09:00
Takeshi KOMIYA
fb92547b91
Fix #9866 : autodoc: doccoment for the imported class was ignored
...
Autodoc tried to scan doccomment on the module where the class defined.
But it failed to get it if the class is imported from other module.
This analyzes the target module to obtain the doccomment.
2021-11-21 18:50:54 +09:00
Takeshi KOMIYA
b8844eb339
Fix #9781 : autodoc_preserve_defaults does not support hexadecimal
2021-10-31 01:11:56 +09:00
Takeshi KOMIYA
b778ee806e
Fix #9752 : autodoc: Failed to detect type annotation for slots attribute
2021-10-23 14:59:36 +09:00
Takeshi KOMIYA
10b7f0e252
Fix #9607 : autodoc: Incorrect base class detection
...
In case of the descendants of generic class, the value of
obj.__orig_bases__ is incorrect because it returns original base
arguments for the child of the generic class instead of the target
class itself.
This uses obj.__dict__ to get the correct __orig_bases__ information.
2021-09-20 13:20:26 +09:00
Takeshi KOMIYA
ccfca458ea
Close #9639 : autodoc: Support asynchronous generator functions
2021-09-17 02:20:40 +09:00
Christian Clauss
86583c578c
Fix typos discovered by codespell
2021-09-08 02:15:25 +02:00
Jeremy Maitin-Shepard
6c969ac87e
Fix autodoc_docstring_signature support for __init__ and __new__
...
The `MethodDocumenter.get_doc` method added by
51ae283a38
prevents
DocstringSignatureMixin from working correctly for __init__ and
__new__ methods. Additionally, the __new__ docstring was not obtained
correctly.
This commit checks for `self._new_docstrings` being set, and also
corrects the logic for obtaining the __new__ docstring.
There still remains the issue that when the class signature is
obtained from the signature of __init__ or __new__, only the real
signature is used, due to the use of `sphinx.util.inspect.signature`;
the autodoc_docstring_signature option does not have any effect.
2021-07-31 09:32:40 -07:00
Takeshi KOMIYA
38d80c3d0f
Close #9445 : autodoc: Support class properties
...
Since python 3.9, `classmethod` starts to support creating a "class
property". This supports to generate document for it.
2021-07-17 16:39:50 +09:00
Takeshi KOMIYA
2aef00d7bd
Fix #9384 : autodoc_typehints='none' supports typehints for attributes
2021-06-29 21:57:26 +09:00
Takeshi KOMIYA
9a9433e403
Fix #9283 : autodoc: failed to build doc for attribute not commented
...
Autoattribute directive should check the existence of instance attribute
that is defined inside __init__() but not having comments before
accessing it.
2021-05-30 19:48:11 +09:00
Takeshi KOMIYA
4ceedc102d
Close #8061 , #9218 : autodoc: Support variable comment for alias classes
2021-05-15 16:31:40 +09:00
Takeshi KOMIYA
d69c35b1a4
Fix #9175 : autodoc: Special member is not documented in the module
...
The special members are not treated as "attributes". So they're not
handled by DataDocumenter. This moves the detection to the earlier
step of filter_members().
2021-05-08 17:33:33 +09:00
Takeshi KOMIYA
110fe1797c
Merge pull request #9159 from tk0miya/8588_nested_autodoc_type_aliases
...
Fix #8588 : autodoc_type_aliases does not support dotted name
2021-05-03 22:30:01 +09:00
Takeshi KOMIYA
30efa3d947
Merge branch '4.x' into 8597_metadata_only_docstring
2021-05-03 22:11:10 +09:00