summaryrefslogtreecommitdiff
path: root/sphinx/ext/autodoc/mock.py
Commit message (Collapse)AuthorAgeFilesLines
* Run pyupgrade (#11070)Adam Turner2023-01-021-3/+3
|
* Use PEP 604 typesAdam Turner2023-01-011-3/+3
|
* Use PEP 595 typesAdam Turner2023-01-011-9/+9
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Reduce complexity by removing recursion.Christian Walch2022-04-011-2/+4
|
* Move method `isboundmethod()` into sphinx/util/inspect.py.Christian Walch2022-04-011-9/+1
|
* Rename function `_method_is_bound()` -> `isboundmethod()`.Christian Walch2022-04-011-2/+2
|
* Add types and docstring to function `_method_is_bound()`.Christian Walch2022-03-311-1/+2
|
* Add unwittingly removed empty line.Christian Walch2022-03-311-0/+1
|
* Use recursive call to `ismock()` on unbound method instead of using ↵Christian Walch2022-03-311-4/+2
| | | | temporary object.
* Closes #10310: Sphinx automodule: class method not documented when decorated ↵Christian Walch2022-03-311-3/+15
| | | | with mocked function.
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* Fix #10133: autodoc: Crashed when mocked module is used for type annotationTakeshi KOMIYA2022-01-301-0/+5
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Fix #9883: autodoc: doccomment for the alias to mocked object was ignoredTakeshi KOMIYA2021-11-291-1/+2
|
* Fix #9657: autodoc: basecls for a subclass of mocked object is incorrectTakeshi KOMIYA2021-09-211-1/+3
|
* refactor: Use PEP-526 based variable annotation (sphinx.ext)Takeshi KOMIYA2021-03-151-4/+4
|
* Merge branch '3.x'Takeshi KOMIYA2021-01-281-7/+20
|\
| * Fix #8134: autodoc: crashes when mocked decorator takes argumentsTakeshi KOMIYA2021-01-241-7/+20
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-081-1/+4
|\ \ | |/
| * Fix #8655: autodoc: Crashes when object raises an exception on hasattr()Takeshi KOMIYA2021-01-051-1/+4
| | | | | | | | | | | | | | | | | | | | autodoc crashes when the target object raises an exception on `hasattr()`. The `hasattr()` function internally calls the `obj.__getattr__()` or `obj.__getattribute__()` of the target object. Hence the reaction can be changed on the target object. This starts to use `safe_getattr()` to check the object is mocked or not and to prevent an unexpected error.
* | Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. 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
* | Merge branch '3.x'Takeshi KOMIYA2020-12-291-0/+22
|\ \ | |/
| * autodoc: Add a helper that checks the object is mocked; ismock()Takeshi KOMIYA2020-12-281-0/+22
| |
* | Merge branch '3.x'Takeshi KOMIYA2020-07-051-2/+2
|\ \ | |/
| * Fix #7886: autodoc: TypeError is raised on mocking generic-typed classesTakeshi KOMIYA2020-06-301-2/+2
| |
* | refactor: Update type annotationsTakeshi KOMIYA2020-05-021-3/+3
|/
* Fix #7479: autodoc: Sphinx builds has been slower since 3.0.0Takeshi KOMIYA2020-04-191-0/+2
| | | | | | Call ``inspect.unwrap()`` for Mocked objects and modules causes deep recurrsion calls. As a result, it causes slow builds. This skips to try documenting mocked objects on filtering members.
* Merge branch '2.0'Takeshi KOMIYA2020-01-111-1/+1
|\
| * refactor: Rename var keyword argument to "**kwargs"Takeshi KOMIYA2020-01-081-1/+1
| |
* | Merge branch '2.0'Takeshi KOMIYA2020-01-011-4/+4
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2020-01-011-1/+1
| |
| * mypy: Enable disallow_incomplete_defs flag for type checkingTakeshi KOMIYA2019-12-301-3/+3
| |
* | Merge branch '2.0'Takeshi KOMIYA2019-10-201-1/+1
|\ \ | |/
| * Fix #6709: autodoc: mock object does not work as a class decoratorTakeshi KOMIYA2019-10-061-1/+1
| |
* | Merge branch '2.0'Takeshi KOMIYA2019-07-011-46/+24
|\ \ | |/
| * Migrate to py3 style type annotation: sphinx.ext.autodoc.mockTakeshi KOMIYA2019-07-011-54/+28
| |
* | Drop features and APIs deprecated in 1.8Takeshi KOMIYA2019-03-301-50/+2
|/
* Python-3-only clean ups discovered by pyupgradeJon Dufresne2019-03-171-1/+1
| | | | | | | | | | | | | | https://github.com/asottile/pyupgrade > A tool to automatically upgrade syntax for newer versions of the > language. - Drop u str prefix - Drop base object inheritance - Drop args to super() - Use set literals - Use dict comprehension - Use set comprehension
* refactor: Move implementation of mock to sphinx.ext.autodoc.mockTakeshi KOMIYA2019-02-271-0/+217