Adam Turner
08dbaa793e
Fix SIM117 (use single 'with' statement)
2023-08-14 00:18:13 +01:00
Adam Turner
f4c8a0a68e
Insert `from __future__ import annotations
`
2023-01-01 20:48:37 +00:00
Takeshi KOMIYA
7e68154e49
Drop python 3.6 support ( #10468 )
2022-06-16 19:33:55 +01:00
Christian Walch
57d6ec7697
Extend test_mock_decorator
for class method.
2022-04-01 07:37:07 +02:00
Adam Turner
5775912455
Collapse single line docstrings
2022-02-20 03:13:45 +00:00
Adam Turner
6bb7b891a1
Remove copyright and licence fields
2022-02-20 03:06:23 +00:00
Adam Turner
5694e0ce60
Fix module docstring indentation
2022-02-20 00:35:13 +00:00
Adam Turner
4f5a3269a6
Fix module docstring first line
2022-02-20 00:11:08 +00:00
Adam Turner
6b8bccec59
Remove module titles in docstrings
2022-02-19 23:17:29 +00:00
Takeshi KOMIYA
b84771dcd2
A happy new year!
2022-01-01 18:45:03 +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
a78c6b799f
Fix #8134 : autodoc: crashes when mocked decorator takes arguments
...
autodoc crashed when a decorator in mocked module takes arguments
because mock system returns the first argument for the decorator as a
decorated object.
This changes the approach for mocking decorators that remembers
arguments for each decoration, and fetch the latest argument on
generating document.
2021-01-24 14:18:00 +09:00
Takeshi KOMIYA
f996859420
A happy new year!
...
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA
476169284d
autodoc: Add a helper that checks the object is mocked; ismock()
2020-12-28 21:50:36 +09:00
Takeshi KOMIYA
d6ca2f97be
Fix #7886 : autodoc: TypeError is raised on mocking generic-typed classes
2020-06-30 01:16:38 +09:00
Takeshi KOMIYA
0319faf8f1
Merge branch '2.0'
2020-01-01 14:40:39 +09:00
Takeshi KOMIYA
eaf495c3c4
A happy new year!
2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
a6a2a59ab0
Merge branch '2.0'
2019-10-20 13:43:30 +09:00
Takeshi KOMIYA
59336da8bd
Fix #6709 : autodoc: mock object does not work as a class decorator
2019-10-06 23:31:07 +09:00
Takeshi KOMIYA
01f8dad160
Merge branch '2.0'
2019-08-19 00:37:30 +09:00
Jon Dufresne
ecb1e763ad
Switch uses of __import__ to importlib.get_module()
...
The Python docs for __import__ recommend using importlib.get_module().
https://docs.python.org/3/library/functions.html#__import__
> Note: This is an advanced function that is not needed in everyday
> Python programming, unlike importlib.import_module().
As importlib.get_module() uses the Python module cache and returns the
module, this also allows simplifying many module cache checks of use of
sys.modules.
importlib.get_module() has been available since Python 3.3.
2019-08-17 11:45:39 -07:00
Takeshi KOMIYA
61098a0ae2
Drop features and APIs deprecated in 1.8
2019-03-30 14:50:37 +09:00
Takeshi KOMIYA
af51e9825a
refactor: Move implementation of mock to sphinx.ext.autodoc.mock
2019-02-27 21:42:23 +09:00