96 Commits

Author SHA1 Message Date
Christian Clauss
cb77162144 Migrate configs for isort, mypy, and pytest into pyproject.toml (#10844) 2022-09-21 18:46:30 +01:00
danieleades
9b65adc50c Shrink strict optional whitelist (HTML writers) (#10838) 2022-09-20 22:26:39 +01:00
danieleades
276f430b57 Begin addding flake8-simplify checks (#10820)
Start with SIM104 and ignore all other flake8-simplify warnings
2022-09-20 21:30:31 +01:00
Adam Turner
b347657809 Use declarative metadata
- Move to pyproject.toml metadata
- Update references to `setup.py`
- Use pypa/build
- Update workflows and tooling
2022-09-13 10:31:27 +01:00
danieleades
fe2f96ac99 Shink the strict optional whitelist (#10800)
Removes `sphinx.search`
2022-09-09 07:29:54 +01:00
danieleades
c5ae5855ae Remove sphinx.builders.gettext module from whitelist (#10798) 2022-09-09 02:35:59 +01:00
danieleades
5e9550c78e Fix more strict static typing errors (#10681) 2022-08-28 21:17:14 +01:00
danieleades
2b02173617 Further improve type annotations, reduce mypy whitelist (#10770)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-08-28 19:50:01 +01:00
danieleades
c3d8a7d50b Fix some static typing errors (#10745) 2022-08-14 15:27:16 +01:00
daniel.eades
63edba0388 set up mypy for incremental adoption of 'strict optional' 2022-07-26 08:32:20 +01:00
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
danieleades
13fb17468e Remove redundant static typing casts (#10612) 2022-07-02 11:04:31 +01:00
Adam Turner
6ef22d2613 Increase static typing strictness (#10530) 2022-06-16 19:50:01 +01:00
Takeshi KOMIYA
26e00bda0e Merge branch '5.x' into sphinx-docs-build 2022-04-17 11:53:15 +09:00
Adam Turner
0db2817328 Add command runners 2022-04-16 21:12:18 +01:00
Adam Turner
ec0c13c26d Don't use deprecated setup.py build_sphinx 2022-04-16 19:08:27 +01:00
Hugo van Kemenade
61b3676f4c Use license_files to fix setuptools deprecation warning 2022-03-24 18:06:26 +02:00
Adam Turner
51c6642ec2 Remove redundant sphinx/utils/checks.py 2022-02-20 03:31:33 +00:00
Takeshi KOMIYA
62a0ee3fef Merge branch '3.x' 2020-12-31 14:33:09 +09:00
Takeshi KOMIYA
f054b9b976 refactor: Reduce warnings on testing 2020-12-29 19:23:46 +09:00
Takeshi KOMIYA
3a4ae2092a Merge branch '3.x' 2020-11-21 01:01:36 +09:00
Takeshi KOMIYA
be008a049e test: Apply flake8 to tests/ directory 2020-11-16 20:31:50 +09:00
Takeshi KOMIYA
279e547860 Merge branch '3.x' 2020-11-12 02:50:43 +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
c40b4249cd Merge branch '3.x' into master 2020-10-28 02:23:36 +09:00
oleg.hoefling
35725f02d9 move registration of public markers to sphinx.testing.fixtures
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2020-10-25 11:29:59 +01:00
Takeshi KOMIYA
41963e3559 refactor: Clean up filterwarnings
Since 4.0, Sphinx does not use lib2to3.  Therefore a filterwarnings
entry for lib2to3 is no longer needed.
2020-05-04 02:03:22 +09:00
Takeshi KOMIYA
1c33824aea Merge branch '3.x' 2020-05-04 02:02:48 +09:00
Takeshi KOMIYA
3fee5a1ad8 refactor: Catch ImportError for lib2to3 to support future python 2020-05-04 01:47:42 +09:00
Takeshi KOMIYA
3407143023 refactor: Suppress DeprecationWarning for pyximport 2020-05-04 00:27:38 +09:00
Takeshi KOMIYA
c7e590818a Merge branch '3.x' 2020-03-21 17:53:22 +09:00
Daniel Hahler
2495277b86 pytest: configure testpaths
This avoids having unrelated files being collected.
2020-03-12 16:41:36 +01:00
Takeshi KOMIYA
1fb79cff45 Run mypy under py36 mode 2020-03-07 19:36:41 +09:00
Takeshi KOMIYA
09623a97d0 Merge branch '2.x' into 3.x 2020-03-05 23:11:14 +09:00
Takeshi KOMIYA
3e7b18e971 Unpin coverage package
coverage-5.0 expects to set "parallel = True" on config file.
refs: https://github.com/nedbat/coveragepy/issues/716#issuecomment-429491441
2020-03-05 22:38:47 +09:00
Takeshi KOMIYA
e628afd5cd Merge branch '2.0' 2020-01-01 11:39:46 +09:00
Takeshi KOMIYA
ab184ac20d mypy: Enable disallow_incomplete_defs flag for type checking 2019-12-30 17:22:56 +09:00
Jon Dufresne
acb2eadc8e Specify the target Python version in the mypy configuration
Currently targets Python 3.5.

This caught a bug. The subprocess.run() function only started taking the
'encoding' keyword argument starting with Python 3.6.
2019-08-16 12:08:28 -07:00
Jon Dufresne
8d93da09ba Remove "universal" configuration from setup.cfg
Sphinx is Python-3-only and therefore is not a universal wheel. It
should still distribute a 'py3' wheel, just not a universal one.

From https://wheel.readthedocs.io/en/stable/user_guide.html

> If your project contains no C extensions and is expected to work on
> both Python 2 and 3, you will want to tell wheel to produce universal
> wheels by adding this to your setup.cfg file: …

As Sphinx doesn't work on Python 2, it should not be universal.

Refs #6470
2019-06-13 08:07:54 -07:00
Takeshi KOMIYA
a38ce3bfc7 test: declare pytest markers
To stop PytestUnknownMarkWarning, this declares markers on setup.cfg
https://docs.pytest.org/en/latest/mark.html
2019-05-12 15:21:04 +09:00
Jon Dufresne
5d497d0083 Remove redundant mypy config 'incremental'
The mypy config 'incremental` has defaulted as true since version 0.590.
Can drop the local override. For details, see:

6b13652a46
2019-01-06 06:58:26 -08:00
Takeshi KOMIYA
53917f228f Move to py3 mode for mypy (and remove many "type: ignore" comments) 2018-12-15 02:42:42 +09:00
Takeshi KOMIYA
c2590a45c1 test: Give filterwarnings=all by ini file
Since pytest-3.9, precedence order of warning options had been
changed.  This moves ``-W all`` option into setup.cfg.

In detail, see https://github.com/pytest-dev/pytest/issues/3946
2018-10-30 00:01:39 +09:00
Takeshi KOMIYA
3e57ea0a52 Merge branch '1.7' 2018-07-17 00:37:40 +09:00
Takeshi KOMIYA
2bdbe3aaf4 Fix flake8 violations 2018-07-16 21:03:32 +09:00
Stephen Finucane
d9ccc95717 doc: Add "extensions" to usage guide
Signed-off-by: Stephen Finucane <stephen@that.guru>
2018-06-20 09:30:47 +01:00
Takeshi KOMIYA
656f80cca9 mypy: add --no-strict-optional
Since mypy-0.600, validations for Optional becomes very strict. It
interfere our development. So this disables it temporarily.
2018-05-03 10:26:59 +09:00
Dmitry Shachnev
16d4e00043 Remove sphinx.pycode.pgen2 from flake8 exclude 2018-03-01 18:33:42 +03:00
Takeshi KOMIYA
4344fa149c Merge pull request #4505 from tk0miya/use_flake8-import-order
Use flake8-import-order
2018-01-29 22:13:48 +09:00
Takeshi KOMIYA
6926a3ed91 Merge branch '1.7-release' into use_flake8-import-order 2018-01-28 19:03:31 +09:00