Commit Graph

33 Commits

Author SHA1 Message Date
Adam Turner
24e3b7c8c8 .read_text() -> .read_text(encoding='utf8') 2022-04-27 03:04:19 +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
5260143afe Fix #8704: viewcode: anchors are generated in incremental build
The anchors for viewcode was generated in the reading phase only if
supported builder is used.  It causes anchors are missing on the
incremental build after the build for non supported builder.

This introduces `viewcode_anchor` node to insert the anchor even if non
supported builders.  They will be converted to the anchor tag in the
resolving phase for supported builders.  Or, they will be removed for
non supported builders.
2021-01-22 21:41:42 +09:00
Takeshi KOMIYA
b2bb12ad91 Fix #8720: viewcode: module pages are generated for epub on incremental build
The module pages should be generated for epub only if enabled via
configuration.  But they are generated after the build for other
viewcode-supported builders.  This checks the current builder on
generating module pages.
2021-01-22 00:51:21 +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
4dd8b1022f test: Use read_text() and read_bytes() 2020-02-01 11:58:51 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
c4c878303f encoding keyword for path.text() and path.write_text() is no longer needed 2019-01-03 10:58:07 +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
Takeshi KOMIYA
5e5bdb8a64 Remove absolute_import 2018-12-17 20:47:49 +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
Ashley Whetter
44da51a564 Plugins can find source code for viewcode
Fixes #4035
2018-04-24 14:45:16 -07:00
Takeshi KOMIYA
f1c6c22e84 Fix #4701: viewcode: Misplaced `<div>` in viewcode html output 2018-03-05 23:46:34 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Takeshi KOMIYA
c1555638ae
Merge pull request #2299 from scVENUS/fix_attribute_docstrings_of_imported_class
Fix #2298: automodule fails to document a class attribute.
2017-11-12 01:48:48 +09:00
Takeshi KOMIYA
8f9dd64992 Merge branch 'stable' 2017-03-26 11:52:15 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Ray Lehtiniemi
560c8ab29d Add more decorator tests
Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
2017-03-11 14:16:23 -07:00
shimizukawa
baaef9146d pytest: remove deprecated with_app decorator functions 2017-01-06 01:14:47 +09:00
Anselm Kruis
de356149cd Test for bug #2298: automodule fails to document a class attribute
This test case demonstrates a bug, where automodule:: with option
:members: fails to document a class attribute of a class, that was
imported into the documented module.

This commit extends test_ext_viewcode, instead of creating a separate
test module, because the development guide recommends it for performance
reasons.
2016-02-05 17:42:14 +01:00
Georg Brandl
46d7e8558e Obligatory copyright update. 2016-01-14 22:54:04 +01:00
Georg Brandl
a23903d8d5 Merge branch 'stable' 2015-01-03 21:41:14 +01:00
Georg Brandl
a73ab32bc5 Split viewcode and linkcode tests out of main test root. 2014-09-21 17:34:16 +02:00
Georg Brandl
d47a7587f9 Complete test suite overhaul.
* rename a few test modules to make the names more consistent

* do not copy/use Sphinx from build/ (unnecessary without 2to3)

* use a temporary dir for *all* test projects, the source tree
  will stay pristine that way  (default is tests/build)

* speed up tests by ~3x by splitting up test projects and avoiding
  rebuilds
2014-09-21 17:17:02 +02:00
Takayuki Shimizukawa
799ae87ce0 fix fc1901d for py3, again. and add 2 assertions 2014-08-22 13:01:11 +09:00
Takayuki Shimizukawa
2987330a11 fix fc1901d for py3 2014-08-22 12:39:42 +09:00
Takayuki Shimizukawa
e8b870de0c :mod:~sphinx.ext.viewcode support imported function/class aliases. Closes #623 2014-08-22 11:38:56 +09:00