Commit Graph

40 Commits

Author SHA1 Message Date
Adam Turner
c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Adam Turner
a13cf2c24d Adopt `profile = "black" for isort`
This allows using Ruff's import sorting fixers
2023-01-07 18:31:15 +00:00
Adam Turner
476c115b0e
Suppress `ValueError in apply_source_workaround` (#11092) 2023-01-05 16:56:27 +00:00
Adam Turner
f4c8a0a68e Insert `from __future__ import annotations` 2023-01-01 20:48:37 +00:00
Adam Turner
b91f6617ed Enable Ruff's pylint 'PLC2201' check
Address all cases where the comparison order check is violated
2022-12-30 00:06:11 +00:00
Adam Turner
a8827f3329 Catch DeprecationWarning for docutils.frontend.OptionParser 2022-04-22 04:21:38 +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
a0e44a7300 test: Migrate to Node.findall() from Node.traverse() 2022-01-03 01:06:20 +09:00
Takeshi KOMIYA
b84771dcd2 A happy new year! 2022-01-01 18:45:03 +09:00
Takeshi KOMIYA
179e0bf8a2 refactor: Node.traverse() will returns generator since 0.18 2021-10-10 15:50:39 +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
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
7aa5584a47 Fix #7301: capital characters are not allowed for node_id 2020-03-29 23:55:56 +09: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
c0cc755306 test: Add testcase for make_id() 2020-03-20 19:34:19 +09:00
Takeshi KOMIYA
1c5a5bbbe5 Add sphinx.util.nodes:make_id() to generate better node_id 2020-01-02 22:03:39 +09:00
Takeshi KOMIYA
eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA
092d87bde9 Fix #6375: extlinks: Cannot escape angle brackets in link caption 2019-05-16 23:14:57 +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
722c92250c Fix #5648: NodeMatcher matches Text node on attribute match 2018-11-25 01:16:17 +09:00
Takeshi KOMIYA
9f7afa161e Add NodeMatcher; a helper class for Node.traverse() 2018-08-26 18:14:07 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +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
Takeshi KOMIYA
3b9aee43a2 Fix #185: References to section title including raw node has broken 2016-12-17 17:29:03 +09:00
Takeshi KOMIYA
80921b2ab8 Fix flake8 violation under tests/ 2016-06-12 00:02:11 +09:00
Georg Brandl
46d7e8558e Obligatory copyright update. 2016-01-14 22:54:04 +01:00
shimizukawa
4c7db6c67d fix line length 2015-11-29 22:23:56 +09:00
shimizukawa
f886c54263 Fix #1994: More supporting non-standard parser (like recommonmark parser) for Translation and WebSupport feature. Now node.rawsource is fall backed to node.astext() during docutils transforming. 2015-09-13 00:20:21 +09:00
Georg Brandl
a23903d8d5 Merge branch 'stable' 2015-01-03 21:41:14 +01:00
Georg Brandl
567d52f199 all: update copyright 2015-01-03 21:36:32 +01: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
8f7936d75c * gettext does not extract nodes.line in a table or list. Closes #1477 2014-08-26 01:39:26 +09:00