Commit Graph

40 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
Takeshi KOMIYA
7bbf79c313 Fix #7301: Allow . and _ for node_id
In development of 3.0, Sphinx starts to obey to the rule of
"Identifier Normalization" of docutils.  This extends it to allow
dots(".") and underscores("_") for node identifier.

It allows Sphinx to generate node identifier from source string as
possible as it is (bacause dots and underscores are usually used in
many programming langauges).

This change will keep not to break hyperlinks as possible.
2020-03-22 16:39:00 +09:00
Takeshi KOMIYA
729efd28b0 py domain: Generate node_id for objects in the right way 2020-03-07 02:00:50 +09:00
Takeshi KOMIYA
5ff3b9dc4d py domain: Generate node_id for modules in the right way 2020-03-07 01:48:17 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Eric Larson
c0e46adc07 ENH: Explain rebuilds 2019-08-06 09:59:35 -04:00
Takeshi KOMIYA
d615eff08e Fix #6531: Failed to load last environment object when extension added 2019-06-30 15:21:13 +09:00
Jon Dufresne
f210475489 Python-3-only clean ups discovered by pyupgrade
https://github.com/asottile/pyupgrade

> A tool to automatically upgrade syntax for newer versions of the
> language.

- Drop u str prefix
- Drop base object inheritance
- Drop args to super()
- Use set literals
- Use dict comprehension
- Use set comprehension
2019-03-17 12:58:03 -07: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
Takayuki SHIMIZUKAWA
795b518464
Add PathComparer for testing and fix 2 test failure on Windows. (#5943)
commits are squashed.

* Add PathComparer for testing and fix 2 test failure on Windows.
* fix flake8
* add type information by f2f review. Thanks to @tk0miya!
* fix mypy, flake8 again..
2019-01-13 18:40:35 +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
84e1eeb8a2 Move env.doc2path() and env.path2doc() to Project class 2018-10-16 10:34:59 +09:00
Takeshi KOMIYA
d01d494119 Deprecate env.update()!
To make BuildEnvironment simple, the responsibility of converting
source files to doctrees is moved to Builder class.
2018-02-24 13:06:46 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Takeshi KOMIYA
a9efb2517a Fix flake8 violations 2017-12-23 21:21:21 +09:00
shimizukawa
d497d74370 refs #3458: add sphinx.testing that are moved from /tests directory. 2017-05-14 20:47:15 +09:00
Takeshi KOMIYA
a5d77a8f06 Drop warning for nonlocal image URI 2017-04-19 01:40:17 +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
Takeshi KOMIYA
cd3f48bb76 Create an instance of builder before initialize env 2017-03-19 23:16:37 +09:00
Takeshi KOMIYA
c7bec75bcd BuildEnvironment always own application object (after read phase) 2017-03-08 12:23:25 +09:00
Takeshi KOMIYA
8cbe1efe8d Merge branch 'stable' 2017-01-10 01:04:21 +09:00
shimizukawa
561abdd164 pytest optimizatoin:
- remote using deprecated decorators
- remove gen_with_app
- remove yield testing
- remove pytest warnings
- refactoring
2017-01-08 15:14:38 +09:00
shimizukawa
5b7d237db3 pytest migration 2017-01-04 00:59:30 +09:00
Takeshi KOMIYA
e755a8c004 Use loggers 2017-01-02 12:59:51 +09:00
Takeshi KOMIYA
736615c18c Optimized tests: remove markups for warnings 2016-07-15 00:30:44 +09:00
Takeshi KOMIYA
e48335097c Fix broken testcase 2016-04-22 18:40:41 +09:00
Georg Brandl
46d7e8558e Obligatory copyright update. 2016-01-14 22:54:04 +01:00
Hong Xu
2ee03a2729 Fix #981: LaTeX: support image file names with more than 1 dots
LaTeX cannot detect image file names with more than 1 dots in it
correctly. The solution is to use '{}' to surround the base name. See
https://tex.stackexchange.com/questions/10574/includegraphics-dots-in-filename

Fix #981
2015-12-17 19:03:31 -08:00
Georg Brandl
309e0169b0 Adapt test after env-updated change. 2015-01-25 16:25:32 +01:00
Georg Brandl
a23903d8d5 Merge branch 'stable' 2015-01-03 21:41:14 +01:00
Georg Brandl
7bbaa4c73f Test suite fixes after env.update() change. 2014-09-22 15:08:15 +02:00
Georg Brandl
e7ed7cd627 Rename env-read-docs to env-before-read-docs, add changelog entry and fixup tests. 2014-09-22 09:13:44 +02:00
Georg Brandl
cdaf4b0a52 remove a few unused imports 2014-09-21 20:28:37 +02:00
Georg Brandl
70cf797c10 fix incompatibility in doctree between gettext and the rest 2014-09-21 18:46:15 +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