Commit Graph
134 Commits
Author SHA1 Message Date
Adam Turner 49d8304670 Start using `pathlib.Path and deprecate sphinx.testing.path` (#11526) 2023-07-28 00:39:12 +01:00
Adam TurnerandBénédikt Tran 8452300d54 Fix multi-line copyright when `SOURCE_DATE_EPOCH` is set (#11524)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2023-07-27 21:27:14 +01:00
Stefanie MolinandAdam Turner e09d02e440 Allow `copyright` to contain multiple entries (#10983)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-11 22:43:48 +01:00
Adam Turner d2aa91f63c Revert the default type of `nitpick_ignore[_regex] to list` 2023-04-25 11:31:57 +01:00
Adam Turner 7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Adam Turner 52a099b7ec Resolve lint errors from Ruff 0.0.261 2023-04-05 14:19:43 +01:00
Adam Turner f6435a9bc3 Prefer `@pytest.fixture()` 2023-02-18 01:58:05 +00:00
Adam Turner c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Jean-François B 0fcd359663 Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 compat
Relates #11145
2023-01-21 11:11:03 +01:00
danieleadesandAdam Turner 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
Adam Turner 41ac59ef6b Spelling (language) 2022-05-30 12:35:08 +01:00
Adam Turner 200414982c Update test 2022-05-28 19:55:30 +01:00
Adam Turner 479e48266c Update warning, revert my original warning patch 2022-05-28 19:17:46 +01:00
Adam Turner a3d0983552 Add warning 2022-05-28 19:06:48 +01:00
Adam Turner 57e4a2f4cc Fix case where language isn't set 2022-05-28 00:06:29 +01:00
Adam Turner 20a1775c83 Add test 2022-05-27 23:51:40 +01:00
Adam Turner 4674cc11c8 .write_text(...) -> .write_text(..., encoding='utf8') 2022-04-27 03:11:08 +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 b691ebcc3e Conform to PEP 257 summary line conventions 2022-02-20 02:57:02 +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 e5f6c77263 refactor: Do config file existence check in Config.read() 2021-05-16 23:48:42 +09:00
ruro afa80dfe03 add tests for nitpick_ignore_regex 2021-05-02 14:54:00 +03:00
ruro 0aea6d318c add tests for regular nitpick_ignore 2021-05-02 14:53:46 +03:00
Takeshi KOMIYA 3059a999b2 Close #8326: Rename master_doc to root_doc
To describe the purpose more accurately, the `master_doc` is now renamed
to `root_doc`.  The old name is still available.  But it is recommeneded
to use new one from now on.
2021-02-28 17:10:57 +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 eaf495c3c4 A happy new year! 2020-01-01 14:27:43 +09:00
Takeshi KOMIYA ebdd210a6b Fix #6900: sphinx-build: -D option does not considers 0 and 1 as a boolean value 2019-12-15 22:07:05 +09:00
Takeshi KOMIYA c83f2a0272 Fix #6140: Use unittest.mock instead of mock 2019-03-08 00:27:45 +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 5428d94d24 Remove coding magic comments from tests 2019-01-02 21:53: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
Takeshi KOMIYA d8b69c7f98 Merge pull request #5819 from jdufresne/coding-comment
Remove unnecessary encoding cookie from Python source files
2018-12-17 19:15:00 +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
Jon Dufresne 80861d105b Deprecate sphinx.config.string_classes; remove all internal uses
With only a single text type across supported Python versions, the
string_classes is no longer necessary.

Internally, all uses were converted to the value `[str]`. For
.add_config_value() uses that also supply a default string, the type is
inferred.
2018-12-16 11:35:06 -08:00
Takeshi KOMIYA c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Paul Melnikow e792279791 Improve error message when config fails type check
The old message printed wrapped brackets around the type name, which would make you think it required an array.
2018-10-02 14:20:36 -04:00
Takeshi KOMIYA 973c3ffa25 Merge branch 'master' into change_master_doc_to_index 2018-09-29 21:12:40 +09:00
Takeshi KOMIYA dc44b0d2a9 Merge branch 'master' into HEAD 2018-09-22 22:54:15 +09:00
Takeshi KOMIYA 3a2418a827 refactoring: Drop PY2 and PY3 flags 2018-09-22 21:27:59 +09:00
Jon Dufresne 490e4aed41 Remove unnecessary object from class definitions
In Python 3, all classes are new-style classes. The object in the
definition is redundant and unnecessary.
2018-09-11 07:07:01 -07:00
Takeshi KOMIYA abcb5bd5ec The default setting for master_doc is changed to 'index' 2018-09-04 01:14:16 +09:00
Takeshi KOMIYA 90246b82b5 Check latex_elements at config-inited event 2018-07-29 22:43:13 +09:00
Takeshi KOMIYA f969edfaa8 Fix flake8 violations on tests 2018-07-28 20:19:30 +09:00
Takeshi KOMIYA adbda06eca Fix make_app() fixture fails to rollback registered roles on creating multiple apps 2018-05-17 00:42:48 +09:00