Commit Graph

9 Commits

Author SHA1 Message Date
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
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
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
Georg Brandl
24d303706f Fixup windows newlines. 2014-09-21 20:23:24 +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