Commit Graph

26 Commits

Author SHA1 Message Date
Adam Turner
29e12ec4db
Document `typing.NewType` as a class (#10700) 2023-01-02 18:57:04 +00:00
Takeshi KOMIYA
7e68154e49
Drop python 3.6 support (#10468) 2022-06-16 19:33:55 +01:00
Hugo van Kemenade
184fe83c73 Remove redundant code for Python < 3.6 2022-05-01 17:50:34 +03:00
Takeshi KOMIYA
aa1bc83c2a Merge branch '4.x' 2022-03-19 22:58:15 +09:00
Adam Turner
6bb7b891a1 Remove copyright and licence fields 2022-02-20 03:06:23 +00:00
Adam Turner
b691ebcc3e Conform to PEP 257 summary line conventions 2022-02-20 02:57:02 +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
f72cd83e4d Merge branch '4.x' 2022-02-19 16:08:05 +09:00
Takeshi KOMIYA
b0b51cecc2 Close #10146: autodoc: autodoc_default_options does not support no-value option 2022-01-31 01:51:37 +09:00
Takeshi KOMIYA
616f112e6a autodoc: The default of autodoc_typehints_format becomes to 'smart'
The default value of autodoc_typehints_format configuration is changed
to `'smart'`.  It will suppress the leading module names of typehints
(ex. `io.StringIO` -> `StringIO`).

refs: #9075
2022-01-02 17:35:19 +09:00
Takeshi KOMIYA
e1c090d9f7
Merge pull request #10034 from tk0miya/10027_autodoc_typehints_format_for_bases
Fix #10027: autodoc_typehints_format does not work with :show-inheritance:
2022-01-02 11:39:22 +09:00
Takeshi KOMIYA
b84771dcd2 A happy new year! 2022-01-01 18:45:03 +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
ed227d7d3c Fix #9630: autodoc: Failed to build xrefs if primary_domain is not 'py'
Autodoc generates reST code that uses raw `:obj:` and `:class:` xrefs to
refer the classes and types.  But they're fragile because they assume
the primary_domain=='py'.

This adds `:py:` prefix to these xrefs to make them robust.
2021-09-14 23:59:47 +09:00
Takeshi KOMIYA
58ec5c4089 Fix #9110: autodoc: metadata of GenericAlias is not rendered as a reference in py37+
GenericAliasMixin should use `restify()` to render the metadata of
GenericAlias as py36 does.
2021-04-19 01:11:08 +09:00
Takeshi KOMIYA
7ecf6b88aa Merge branch '3.4.x' into 3.x 2021-01-01 13:56:19 +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
9e9e486e65 Close #8022: autodoc: Allow to hide the value of the variables via metadata
autodata and autoattribute directives does not show right-hand value of
the variable if its docstring contains ``:meta hide-value:`` in
info-field-list.
2020-12-27 12:46:03 +09:00
Takeshi KOMIYA
bb63f03034 Fix #8503: autoattribute could not create document for a GenericAlias 2020-11-29 12:24:10 +09:00
Takeshi KOMIYA
9eb96d5c79 Fix #8460: autodata directive does not display the detail of TypeVars
The details are only shown when automodule directive is used.  This
allows to document them via other auto* directives.
2020-11-22 13:57:48 +09:00
Takeshi KOMIYA
93d6c212f7 Fix #8460: autodoc: Support custom types defined by typing.NewType
A custom type defined by typing.NewType was rendered as a function
because the generated type is a function having special attributes.
This renders it as a variable.

Note: The module name where the NewType object defined is lost on
generating it.  So it is hard to make cross-reference for these custom
types.
2020-11-21 23:04:42 +09:00
François Freitag
419e145e36
Make tests/ a Python package
Allows relative imports.
2020-11-20 19:43:02 +01:00
Takeshi KOMIYA
f344fff55e Fix #8443: autodata directive does not support PEP-526 ivars 2020-11-20 22:38:58 +09:00
Takeshi KOMIYA
5676fdeb4e Rename :novalue: option to :no-value: option
According to the existing options of autodoc directives, `:novalue:`
option is now renamed to `:no-value:` option.
2020-11-15 14:20:30 +09:00