Commit Graph

58 Commits

Author SHA1 Message Date
Adam Turner
18f8c0bfc8 Resolve lint errors from Ruff 0.0.254 2023-03-05 12:54:24 +00:00
Adam Turner
ba080286b0 Explicitly select all linter checks 2023-02-18 02:16:50 +00:00
Adam Turner
f363f1b058 Update Ruff configuration 2023-02-18 02:16:50 +00:00
Adam Turner
845ef67f6c Ignore some pylint checks in Ruff 2023-02-09 03:36:40 +00:00
Adam Turner
7395b05b1c Ignore various lint checks in Ruff 2023-01-31 18:30:20 +00:00
Adam Turner
fedce24134 Ruff code TYP renamed to TCH 2023-01-31 18:13:53 +00:00
Adam Turner
a6c21f92f8 Enable more Ruff checks 2023-01-23 08:32:25 +00:00
Adam Turner
b069d80924 Detect import sorting problems with Ruff 2023-01-23 08:10:22 +00:00
Adam Turner
3c8b76d1cc Ignore `S701` in Ruff 2023-01-23 08:07:31 +00:00
Adam Turner
bf88cd44d0 Ignore `SIM115` in Ruff 2023-01-23 08:07:31 +00:00
Adam Turner
a6b34dd13d Update `PL` code ignores in Ruff 2023-01-23 08:07:31 +00:00
Jean-François B
6845c3fd96 Ignore UP031 check with Ruff 0.0.229 2023-01-22 18:54:22 +01:00
Adam Turner
f022db3e8a Ignore more checks in Ruff 0.0.214 2023-01-07 22:28:45 +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
5008291b3d Ignore more checks in Ruff 0.0.213 2023-01-07 15:08:21 +00:00
danieleades
c499f66012 Add SIM113 lint (#11057)
SIM113: Use ``enumerate``
2023-01-05 11:45:29 +00:00
danieleades
f89f94354e Remove flake8 plugins in favour of Ruff (#11085)
Remove flake8-comprehensions and flake8-bugbear in favour of Ruff.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-01-05 11:40:52 +00:00
danieleades
04791156db Suppress lint failures from Ruff 0.0.211 (#11086)
Ruff has added new SIM lints which sphinx has not implemented.

This suppresses those lints (matching the flake8-simplify config).
2023-01-05 11:38:29 +00:00
Adam Turner
1b887e4c5c Update ruff configuration 2023-01-03 18:37:20 +00:00
danieleades
94e6e3917f De-glob mypy whitelist for 'sphinx.domains.*' (#11064)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-01-02 18:32:44 +00:00
danieleades
256e521807 Shrink mypy whitelist for 'util.nodes' module (#11061) 2023-01-02 17:55:53 +00:00
danieleades
dbf36f8b37 Shrink 'any-generics' whitelist for 'writers' module (#10867)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-01-02 05:29:46 +00:00
danieleades
2759c2c76b Use `any` to find elements in iterable (#11053) 2023-01-02 04:52:46 +00:00
Frazer McLean
5841080319 Clarify licence in Sphinx's metadata (#10956)
Disambiguate which BSD license is used in a computer-parsable form.
2023-01-01 22:12:55 +00:00
Adam Turner
1e900a26e8 Merge branch '6.0.x' 2023-01-01 19:17:24 +00:00
Adam Turner
965768bfda Fix tests for Pygments 2.14
Pygments 2.14 was released on 01/01/2023 [0]

[0]: https://pygments.org/docs/changelog/#version-2-14-0
2023-01-01 19:17:03 +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
2c97bfaa19 Remove redundant import aliases with isort 2022-12-29 23:53:48 +00:00
Adam Turner
5b9736773b Enable Ruff's pyupgrade checks 2022-12-29 23:53:48 +00:00
Adam Turner
3bcf11c30c Enable Ruff's flake8-debugger checks 2022-12-29 23:53:48 +00:00
Adam Turner
7fb45a9058 Enable Ruff's flake8-bandit checks 2022-12-29 23:53:48 +00:00
Adam Turner
b5357774a7 Enable Ruff's pylint checks
Also fix two PLW0602 warnings (``global`` without assignment) and
five PLW0120 warnings (else clause on loop without break).
2022-12-29 23:53:48 +00:00
Adam Turner
b89c33fc0a Enable Ruff's pygrep-hooks checks 2022-12-29 23:53:48 +00:00
danieleades
6a132eba5a Tighten mypy 'strict optional' whitelist (#11038)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-12-29 19:09:17 +00:00
Adam Turner
8634fbce60 Adopt the Ruff code linting tool
https://github.com/charliermarsh/ruff
2022-12-29 17:00:27 +00:00
Sergey B Kirpichev
45a0ea9fc9 Migrate coveragepy config into pyproject.toml (#11025)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-12-29 14:09:56 +00:00
Adam Turner
cd3f2e4350 Update typing ignores for mypy 0.990 2022-11-13 20:36:24 +00:00
Xuan Wang
b90bf8d193 Bump required requests version to 2.25.0 (#10929) 2022-10-22 01:33:32 +01:00
Adam Turner
63dea6172a Merge branch '5.x'
# Conflicts:
#	sphinx/locale/__init__.py
2022-09-30 16:15:24 +01:00
danieleades
bf36a7905a shrink 'any-generics' whitelist for the 'deprecation' module (#10849) 2022-09-29 23:47:58 +01:00
danieleades
3c73efadab shrink 'Any generics' mypy whitelist for builders module (#10846) 2022-09-29 17:26:53 +01:00
danieleades
8267dc4fde shrink 'any-generics' whitelist for the 'locale' module (#10866) 2022-09-29 17:16:36 +01:00
danieleades
6dbb618834 Shrink 'any-generics' whitelist for the pycode module (#10868) 2022-09-28 09:13:48 +01:00
Adam Turner
bb62d2a2ee Increase minimum Docutils to 0.18 2022-09-27 18:31:47 +01:00
Adam Turner
080517ce55 Increase minimum Docutils to 0.17 2022-09-27 18:31:47 +01:00
Adam Turner
4660b62de0 Drop Python 3.7 2022-09-27 18:31:47 +01:00
danieleades
05683f794c Shrink 'any-generics' whitelist for the cmd module (#10847) 2022-09-27 17:56:35 +01:00
Adam Turner
51927bb6e4 Merge branch '5.x' 2022-09-27 16:02:52 +01:00
Adam Turner
8accc34966 Merge branch '5.2.x' into 5.x
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
2022-09-27 15:58:00 +01:00
Adam Turner
89b4f14b44 Fix mypy violations for v0.981 (#10875) 2022-09-27 15:18:20 +01:00