Commit Graph

76 Commits

Author SHA1 Message Date
danieleades
25d379fb53
Lint with flake8-bugbear (#10602)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-07-12 22:55:57 +01:00
Takeshi KOMIYA
51c84e041f Fix #10104: gettext: Duplicated locations are output to pot file
When 3rd party extension does not provide line number for each message,
duplicated locations are output to pot file unexpectedly.  This filters
duplicated locations before generationg pot file.
2022-05-23 01:50:41 +09:00
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
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
Michal Čihař
1bf7fe424e i18n: Add support for having single text domain
The gettext_compact can now be a string which is then a single domain
for all documents.

Fixes #784
2020-08-07 20:22:30 +02: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
95723aa6f6 Fix flake8 violations 2019-07-01 00:28:30 +09:00
Takeshi KOMIYA
46334a2b00 Use subprocess.run() instead of Popen()
Since python3.5, subprocess.run() has been introduced. It works a
wrapper of Popen, and it looks much simple and better. This uses it
instead of Popen to make our code simple.
2019-01-13 23:25:54 +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
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
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
b56f4f9022 Remove print_function feature 2018-12-15 23:16:10 +09:00
Takeshi KOMIYA
f969edfaa8 Fix flake8 violations on tests 2018-07-28 20:19:30 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
cocoatomo
f3d13d9ce7 Fix the dirname for testing files 2018-02-19 09:51:30 +09:00
cocoatomo
07d2cdd47b Add a testcase for deterministic msgid order 2018-02-19 08:57:19 +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
shimizukawa
baaef9146d pytest: remove deprecated with_app decorator functions 2017-01-06 01:14:47 +09:00
shimizukawa
5b7d237db3 pytest migration 2017-01-04 00:59:30 +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
d5dca56ff8 The `gettext_enables config value has been renamed to gettext_additional_targets`. 2015-02-22 13:31:28 +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
Takayuki Shimizukawa
da651089e7 fix trailing space and long line 2014-10-09 23:53:33 +09:00
Takayuki Shimizukawa
9d1225a35b add :confval:gettext_enables to enable extracting 'index' to gettext catalog output / applying translation catalog to generated documentation. Closes #1344 2014-09-28 21:19:54 +09:00
Georg Brandl
ac690b4b07 move new assertion helpers to util.py 2014-09-21 18:54:01 +02:00
Georg Brandl
70cf797c10 fix incompatibility in doctree between gettext and the rest 2014-09-21 18:46:15 +02:00
Georg Brandl
2661c1060d Refactor/speed up test_build_gettext using generators 2014-09-21 18:36:27 +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
Georg Brandl
ac92719ac3 Update copyright year. 2014-03-01 08:18:23 +01:00
Georg Brandl
e030031321 Update copyright year. 2014-03-01 08:18:16 +01:00
Dmitry Shachnev
ce2185ce27 Modernize the code now that Python 2.5 is no longer supported
- Use print function instead of print statement;
- Use new exception handling;
- Use in operator instead of has_key();
- Do not use tuple arguments in functions;
- Other miscellaneous improvements.

This is based on output of `futurize --stage1`, with some
manual corrections.
2014-01-19 14:17:10 +04:00
Georg Brandl
52515eeb86 Copyright header update. 2013-04-01 11:41:48 +02:00
Georg Brandl
1af3e3ea71 tests: replace "from util import *" by explicit imports 2013-04-01 11:39:32 +02:00
Takayuki Shimizukawa
2c409959ac Add i18n capabilities for custom templates.
For example: The Sphinx reference documentation in doc directory provides
sphinx.pot file from ``doc/_templates/*.html`` by ``make gettext``.
2013-03-10 22:07:31 +09:00
Takayuki Shimizukawa
9f8f93e5e1 fix test_seealso failed with python3 2013-01-12 22:26:38 +09:00
Robert Lehmann
32b87e258b merge birkenfeld/sphinx 2013-01-06 12:14:57 +01:00