Commit Graph

129 Commits

Author SHA1 Message Date
Adam Turner
13442f6901 Fix pytest style issues 2023-02-18 02:16:50 +00:00
Adam Turner
c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Adam Turner
a13cf2c24d Adopt `profile = "black" for isort`
This allows using Ruff's import sorting fixers
2023-01-07 18:31:15 +00:00
Adam Turner
4032070e81
Run pyupgrade (#11070) 2023-01-02 00:01:14 +00:00
Takeshi KOMIYA
5344b1b241 Merge branch '5.x' into 10258_autosummary 2022-05-07 21:27:47 +09:00
Adam Turner
4674cc11c8 .write_text(...) -> .write_text(..., encoding='utf8') 2022-04-27 03:11:08 +01:00
Adam Turner
24e3b7c8c8 .read_text() -> .read_text(encoding='utf8') 2022-04-27 03:04:19 +01:00
Matyas Novak
07b2a050c7 Test recognition of a documented instance of a class as a non-imported member of the module 2022-03-14 23:31:33 +01: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
Josh Mitchell
73b7cd51ea Fix lints and reorder args of members_of 2021-11-22 13:57:56 +11:00
Josh Mitchell
8e45229fee Fixed missed ignore___all__ -> ignore_module_all 2021-11-15 13:27:26 +11:00
Josh Mitchell
79089b5fa4 Corrections from review by tk0miya 2021-11-15 13:18:47 +11:00
Josh Mitchell
ad0071ddb7 #2021: Allow autosummary to respect __all__ 2021-11-15 13:16:33 +11:00
Takeshi KOMIYA
0a8655b733 Fix #9600: autosummary: Typehints including commas confuses autosummary 2021-09-04 01:54:11 +09:00
Jake Lishman
9d7fa75d4a
Fix #9568: autosummary: summarise overlined sectioned headings correctly
Add an extra step in the autosummary summariser algorithm to get a valid
text form of section headings.  This fixed issues when the first element
of a summarised document was a section heading with overlines, such as

    =======
    Heading
    =======

Previously, the first line would be taken verbatim, which caused parse
errors in the rest of the document.
2021-08-20 17:05:58 +01:00
Pawel Budzynski
f12f5bc075 add tests 2021-04-29 14:48:56 +02:00
Takeshi KOMIYA
6e438af6c0 test: Update testcase for docutils-0.17 (empty language)
Since v0.17, docutils starts to load language module on parsing reST
document using StateMachine directly.  So far, our testcase uses invalid
language code for testing autosummary.  This fixes it to work with new
docutils.
2021-04-03 23:54:19 +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
54e8b8d9bc refactor: test: Use rollback_sysmodules fixture in test_ext_autosummary 2020-12-31 10:55:45 +09:00
Takeshi KOMIYA
c86e92cb95 Fix #8306: autosummary: mocked modules are documented as empty page
The :recursive: option for autosummary directive creates an empty page
for mocked modules unexpectedly.  This make them ignored.
2020-12-27 21:45:15 +09:00
Takeshi KOMIYA
65ca7aa0c9 Fix #8501: autosummary: summary extraction splits text after "el at."
Add "el at." to the list of abbreviations.
2020-11-28 11:41:06 +09:00
François Freitag
0949735210
Sort imports with isort
Keep imports alphabetically sorted and their order homogeneous across
Python source files.

The isort project has more feature and is more active than the
flake8-import-order plugin.

Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA
92e863fb24 Close #8011: autosummary: Support instance attributes
This allows the autosummary directive to take instance attributes to
build documents for them.
2020-08-01 19:19:18 +09:00
Takeshi KOMIYA
da174138af
Merge pull request #7927 from jnothman/name-case-clash
Add autosummary_filename_map config to avoid clashes
2020-07-24 01:07:19 +09:00
Takeshi KOMIYA
68c732e97c autosummary: Add testcase for module constants (refs: #7469) 2020-07-17 01:15:28 +09:00
Joel Nothman
aae8ce8efa Fix toctree generation 2020-07-15 18:46:51 +10:00
Joel Nothman
52c173bdb9 Responding to comments 2020-07-10 11:30:06 +10:00
Joel Nothman
4e0ff5cac2 Fix attempt with new test root 2020-07-08 22:36:40 +10:00
Joel Nothman
72ca2bdffc Add autosummary_filename_map config to avoid clashes 2020-07-08 16:51:57 +10:00
Takeshi KOMIYA
c4f0d70d17
Merge branch '3.x' into 7865_extract_abbr 2020-06-29 02:04:40 +09:00
Takeshi KOMIYA
2d69b4211a Fix #7865: autosummary: Failed to extract summary line when abbr. found 2020-06-27 23:33:43 +09:00
Takeshi KOMIYA
4fa596ba4c Fix #7866: autosummary: Failed to extract correct summary line
A hyperlink target in the docstring causes a system_error because
node_ids are cached expectedly during extracting a summary.
2020-06-27 23:20:59 +09:00
Eric Wieser
d229b120ad Fix autoclass signature parsing
This fixes:
* Signatures defined by __new__
* Signatures defined by metaclasses
* Signatures defined by builtin base classes

All of these changes bring the sphinx docs inline with the behavior of `inspect.signature`.

Note that this changes autodoc to output `.. py:class: MyClass()` with parentheses even if no user-defined __init__ is present.
This is quite deliberate, as if no user-defined `__init__` is present the default is `object.__init__`, which indeed does not take arguments.
2020-05-28 08:36:56 +01:00
Takeshi KOMIYA
784d4cb36a Fix #7685: autosummary: imported members are listed unexpectedly 2020-05-21 01:24:46 +09:00
Daniel Fremont
de4aca857c revisions per comments from tk0miya 2020-05-17 09:07:11 -07:00
Álvaro Mondéjar
02d5cd439f Update 'test_autosummary_generate' test. 2020-05-14 19:16:45 +02:00
Álvaro Mondéjar
1dcfc44ace Fix automsummary directive wrong processing for invalid modules. 2020-05-14 17:06:12 +02:00
Takeshi KOMIYA
c4d4ba2835 Fix #7551: autosummary: a nested class is indexed as non-nested class 2020-05-07 01:57:46 +09:00
Takeshi KOMIYA
5bf997c55a refactor: Do not pass deprecated parameter in testcase 2020-05-03 23:41:54 +09:00
Takeshi KOMIYA
0bf9011509 Fix #7570: autosummary: template option is broken 2020-04-30 00:14:59 +09:00
Takeshi KOMIYA
037fe96dc1 Close #4030: autosummary: Add autosummary_context 2020-04-25 11:15:43 +09:00
Takeshi KOMIYA
ab3795f176 Fix #7536: sphinx-autogen: crashes when template uses i18n feature 2020-04-23 21:46:32 +09:00
Takeshi KOMIYA
72c57ff131 test: Fix flake8 violation 2020-04-22 01:29:48 +09:00
Takeshi KOMIYA
4a7934ba1a autosummary: Make recursively generated stub-files flatten 2020-04-22 00:27:59 +09:00