Commit Graph

46 Commits

Author SHA1 Message Date
Adam Turner
920828fe35 Run the `pyupgrade` tool 2022-10-17 22:39:09 +01:00
Adam Turner
f95bcf51ef Refactor 2022-05-02 17:51:26 +01:00
Adam Turner
cfa324a7ed Remove always-false branches 2022-05-02 17:47:46 +01:00
Adam Turner
971040b4b7 Merge branch '5.x' into fix-warnings
# Conflicts:
#	tests/test_search.py
2022-05-02 17:05:42 +01:00
Adam Turner
bde47ce679 Add test for duplicated submodules in sphinx.ext.apidoc 2022-05-01 06:12:25 +01: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
Adam Turner
55669f6cfc Specify encoding 2022-04-22 04:21:12 +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
Takeshi KOMIYA
223d615011 Fix #9608: apidoc: module is not described if implicit namespace package
To make implicit namespace packages referencable, this outputs empty
module definitions for them.
2021-09-04 22:44:04 +09:00
Takeshi KOMIYA
650f8ea237 Fix #8727: apidoc: namespace module file is not generated if no submodules
sphinx-apidoc should generate a namespace module file when
`--implicit-namespace` option given.  This fixes the case the namespace
module has subpackages, but no submodules.
2021-01-23 00:40:16 +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
AleksaC
73bbe90ee0 Cleaner fix for double trailing whitespace apidoc 2020-07-11 12:32:37 +02:00
AleksaC
72abb19740 Remove double trailing newlines from apidoc tests 2020-07-10 23:19:07 +02:00
Sergio Garcia Prado
11dbf61626
* Updated tests according to latest changes. 2020-03-15 12:02:49 +01:00
Takeshi KOMIYA
4dd8b1022f test: Use read_text() and read_bytes() 2020-02-01 11:58:51 +09:00
Takeshi KOMIYA
09cf37eebe Fix #6899: apidoc: private members are not shown even if --private given 2020-01-30 23:17:59 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Stephen Finucane
65122ad1cb apidoc: Insert newlines between submodules
Fix a regression introduced in 2.1.0 where submodules didn't have a
newline between them resulting in the following warning:

  Explicit markup ends without a blank line; unexpected unindent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #6440
2019-06-07 15:35:01 +01:00
Takeshi KOMIYA
be6f4fd8f6 refactor apidoc: Add is_skipped_module() 2019-05-30 01:12:23 +09:00
Takeshi KOMIYA
b93f53c7e4 apidoc: Use a template for generating package file 2019-05-04 18:42:22 +09:00
Takeshi KOMIYA
e41d6f3651 apidoc: Use a template for generating toc file 2019-05-04 17:19:31 +09:00
Takeshi KOMIYA
b482e38ca2 apidoc: Use a template for generating module file 2019-05-04 17:19:31 +09:00
Takeshi KOMIYA
891178e8ed test: Reduce warnings on building test-root
Note: all warnings are tested on test-warnings.
2019-02-14 02:20:55 +09:00
Takeshi KOMIYA
a0e1390472 Remove use of deprecated APIs 2019-01-03 13:27:33 +09:00
Takeshi KOMIYA
76e9f57c2e Merge branch '1.8' 2019-01-02 16:16:25 +09:00
Takeshi KOMIYA
1b1ebd2c75 A happy new year! 2019-01-02 16:00:30 +09:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
b56f4f9022 Remove print_function feature 2018-12-15 23:16:10 +09:00
Takeshi KOMIYA
f969edfaa8 Fix flake8 violations on tests 2018-07-28 20:19:30 +09:00
Takeshi KOMIYA
fb41dcefab Fix sphinx.testing uses deprecated pytest API; Node.get_marker(name) 2018-06-07 01:22:55 +09:00
Christer Bystrom
a7aac6956d Closes #4520 - acidic: Subpackage not in toc. The rule of skipping folders with only an empty __init__.py has been removed. The reason for this is that it was never working consistently in the first place and made the code unnecessary hard to reason about. Tests for the TOC generation have been added, as well as tests for the exclude mechanism since they are coupled. One test (test_ext_apidoc.py::test_exclude) has also been modified to reflect the new behaviour. 2018-03-21 14:35:58 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
e700f0ba99 Fix #4581: apidoc: Excluded modules still included 2018-02-11 22:10:33 +09:00
Takeshi KOMIYA
af25fa123d Merge branch 'stable' into 1.7-release 2018-01-28 00:18:33 +09:00
Takeshi KOMIYA
2ae7f26fe5 test: Adjust testcase for #3962 2018-01-07 12:09:41 +09:00
Takeshi KOMIYA
e18c49ec59 Merge commit '4277eb13315d5649401190df86874b3832ddfa3e' 2018-01-07 01:13:32 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Stephen Finucane
87630c8ae8 sphinx-apidoc: Convert to argparse
This is pretty self-explanatory, with most changes coming about as a
side-effect of argparse vs. optparse API differences.

Lowercase characters are used in help strings, per argparse conventions.
Some tests are converted because argparse natively supports unicode.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-09 16:28:39 +01:00
Stephen Finucane
96cf498c9e apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] https://github.com/sphinx-doc/sphinx/pull/3485#issuecomment-288081223
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-09-20 13:42:57 +01:00