Commit Graph

16 Commits

Author SHA1 Message Date
Christian Clauss
86583c578c Fix typos discovered by codespell 2021-09-08 02:15:25 +02: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
114ff77f68 test: Omit master_doc settings from testcases 2019-01-03 10:58:42 +09:00
Takeshi KOMIYA
5428d94d24 Remove coding magic comments from tests 2019-01-02 21:53:07 +09:00
Stephen Finucane
d345d0f8c1 py3: Remove (most) __future__ imports
There were two used:

- print_function
- absolute_import

Both of these are mandatory in Python 3.0 onwards [1] and can therefore
be removed...mostly. Unfortunately, mypy is still running in Python 2.7
mode, meaning we need the 'print_function' future wherever we're calling
'print' with the 'file' argument. There's also a single
'absolute_import' future that must be retained as its removal breaks a
test for as-yet unknown reasons.  TODOs are added to resolve both issues
in the future.

[1] https://docs.python.org/3/library/__future__.html

Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-12-17 09:46:15 +00:00
Ashley Whetter
44da51a564 Plugins can find source code for viewcode
Fixes #4035
2018-04-24 14:45:16 -07:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +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
Ray Lehtiniemi
560c8ab29d Add more decorator tests
Signed-off-by: Ray Lehtiniemi <rayl@mail.com>
2017-03-11 14:16:23 -07: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
shimizukawa
39e403b8ac fix testing for text builder that generate _build/text/_build/text/_build/... recursive directories because *.txt in _build/text previously generated was detected as source file. 2016-01-09 15:35:56 +09:00
Takayuki Shimizukawa
da651089e7 fix trailing space and long line 2014-10-09 23:53:33 +09:00
Georg Brandl
24d303706f Fixup windows newlines. 2014-09-21 20:23:24 +02:00
Georg Brandl
a73ab32bc5 Split viewcode and linkcode tests out of main test root. 2014-09-21 17:34:16 +02:00
Takayuki Shimizukawa
799ae87ce0 fix fc1901d for py3, again. and add 2 assertions 2014-08-22 13:01:11 +09:00
Takayuki Shimizukawa
e8b870de0c :mod:~sphinx.ext.viewcode support imported function/class aliases. Closes #623 2014-08-22 11:38:56 +09:00