Skip to content

Commit ff8ab27

Browse files
authored
Bump deps and tools (#348)
1 parent c3bf68b commit ff8ab27

File tree

6 files changed

+37
-44
lines changed

6 files changed

+37
-44
lines changed

.github/workflows/check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- "3.10"
2222
- "3.9"
2323
- "3.8"
24-
- "3.7"
2524
steps:
2625
- name: Setup python for tox
2726
uses: actions/setup-python@v4

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
rev: v3.3.1
1616
hooks:
1717
- id: pyupgrade
18-
args: ["--py37-plus"]
18+
args: ["--py38-plus"]
1919
exclude: "^(tests/roots/test-dummy/dummy_module.py)$"
2020
- id: pyupgrade
2121
files: "^(tests/roots/test-dummy/dummy_module.py)$"
@@ -25,21 +25,21 @@ repos:
2525
hooks:
2626
- id: isort
2727
- repo: https://github.com/psf/black
28-
rev: 23.1.0
28+
rev: 23.3.0
2929
hooks:
3030
- id: black
3131
args: [--safe]
3232
- repo: https://github.com/asottile/blacken-docs
3333
rev: 1.13.0
3434
hooks:
3535
- id: blacken-docs
36-
additional_dependencies: [black==23.1]
36+
additional_dependencies: [black==23.3]
3737
- repo: https://github.com/pre-commit/pygrep-hooks
3838
rev: v1.10.0
3939
hooks:
4040
- id: rst-backticks
4141
- repo: https://github.com/tox-dev/tox-ini-fmt
42-
rev: "0.6.1"
42+
rev: "1.3.0"
4343
hooks:
4444
- id: tox-ini-fmt
4545
args: ["-p", "fix"]
@@ -48,8 +48,8 @@ repos:
4848
hooks:
4949
- id: flake8
5050
additional_dependencies:
51-
- flake8-bugbear==23.3.12
52-
- flake8-comprehensions==3.11.1
51+
- flake8-bugbear==23.3.23
52+
- flake8-comprehensions==3.12
5353
- flake8-pytest-style==1.7.2
5454
- flake8-spellcheck==0.28
5555
- flake8-unused-arguments==0.0.13

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.3",
5-
"hatchling>=1.13",
5+
"hatchling>=1.14",
66
]
77

88
[project]
@@ -19,7 +19,7 @@ keywords = [
1919
license = "MIT"
2020
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }]
2121
authors = [{ name = "Bernát Gábor", email = "[email protected]" }]
22-
requires-python = ">=3.7"
22+
requires-python = ">=3.8"
2323
classifiers = [
2424
"Development Status :: 5 - Production/Stable",
2525
"Framework :: Sphinx :: Extension",
@@ -34,19 +34,19 @@ dynamic = [
3434
"version",
3535
]
3636
dependencies = [
37-
"Sphinx>=5.3",
37+
"Sphinx>=6.1.3",
3838
]
3939
optional-dependencies.docs = [
40-
"furo>=2022.12.7",
40+
"furo>=2023.3.27",
4141
"sphinx>=6.1.3",
4242
"sphinx-autodoc-typehints>=1.23.4",
4343
]
4444
optional-dependencies.testing = [
45-
"covdefaults>=2.2.2",
46-
"coverage>=7.2.2",
45+
"covdefaults>=2.3",
46+
"coverage>=7.2.3",
4747
"diff-cover>=7.5",
4848
"nptyping>=2.5",
49-
"pytest>=7.2.2",
49+
"pytest>=7.3.1",
5050
"pytest-cov>=4",
5151
"sphobjinv>=2.3.1",
5252
"typing-extensions>=4.5",

src/sphinx_autodoc_typehints/__init__.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,9 @@ def _get_type_hint(autodoc_mock_imports: list[str], name: str, obj: Any) -> dict
406406

407407
def backfill_type_hints(obj: Any, name: str) -> dict[str, Any]:
408408
parse_kwargs = {}
409-
if sys.version_info < (3, 8):
410-
try:
411-
import typed_ast.ast3 as ast
412-
except ImportError:
413-
return {}
414-
else:
415-
import ast
409+
import ast
416410

417-
parse_kwargs = {"type_comments": True}
411+
parse_kwargs = {"type_comments": True}
418412

419413
def _one_child(module: Module) -> stmt | None:
420414
children = module.body # use the body to ignore type comments

src/sphinx_autodoc_typehints/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .attributes_patch import patch_attribute_handling
1313

1414

15-
@lru_cache() # A cute way to make sure the function only runs once.
15+
@lru_cache # A cute way to make sure the function only runs once.
1616
def fix_autodoc_typehints_for_overloaded_methods() -> None:
1717
"""
1818
sphinx-autodoc-typehints responds to the "autodoc-process-signature" event

tox.ini

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tox]
2-
envlist =
2+
requires =
3+
tox>=4.2
4+
env_list =
35
fix
46
py311
57
py310
@@ -9,62 +11,60 @@ envlist =
911
type
1012
coverage
1113
readme
12-
isolated_build = true
1314
skip_missing_interpreters = true
14-
minversion = 3.21
1515

1616
[testenv]
1717
description = run tests with {basepython}
18-
passenv =
19-
PIP_*
20-
PYTEST_*
21-
setenv =
22-
COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname}
18+
package = wheel
19+
wheel_build_env = .pkg
2320
extras =
2421
testing
2522
type-comment
23+
pass_env =
24+
PIP_*
25+
PYTEST_*
26+
set_env =
27+
COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname}
2628
commands =
2729
pytest {tty:--color=yes} {posargs: \
2830
--junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}sphinx_autodoc_typehints --cov {toxinidir}{/}tests \
2931
--cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \
3032
--cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
3133
tests}
3234
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {toxworkdir}{/}coverage.{envname}.xml
33-
package = wheel
34-
wheel_build_env = .pkg
3535

3636
[testenv:fix]
3737
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
3838
skip_install = true
3939
deps =
40-
pre-commit>=3.2
40+
pre-commit>=3.2.2
4141
commands =
4242
pre-commit run --all-files --show-diff-on-failure
4343

4444
[testenv:type]
4545
description = run type check on code base
46-
setenv =
47-
{tty:MYPY_FORCE_COLOR = 1}
4846
deps =
49-
mypy==1.1.1
50-
types-docutils>=0.19.1.6
47+
mypy==1.2
48+
types-docutils>=0.19.1.7
49+
set_env =
50+
{tty:MYPY_FORCE_COLOR = 1}
5151
commands =
5252
mypy --python-version 3.10 src
5353
mypy --python-version 3.10 tests
5454

5555
[testenv:coverage]
5656
description = combine coverage files and generate diff (against DIFF_AGAINST defaulting to origin/main)
57-
passenv =
58-
DIFF_AGAINST
59-
setenv =
60-
COVERAGE_FILE = {toxworkdir}/.coverage
6157
skip_install = true
6258
deps =
6359
covdefaults>=2.3
64-
coverage>=7.2.2
60+
coverage>=7.2.3
6561
diff-cover>=7.5
6662
extras =
6763
parallel_show_output = true
64+
pass_env =
65+
DIFF_AGAINST
66+
set_env =
67+
COVERAGE_FILE = {toxworkdir}/.coverage
6868
commands =
6969
coverage combine
7070
coverage report --skip-covered --show-missing
@@ -91,7 +91,7 @@ commands =
9191

9292
[testenv:dev]
9393
description = generate a DEV environment
94-
usedevelop = true
94+
package = editable
9595
commands =
9696
python -m pip list --format=columns
9797
python -c 'import sys; print(sys.executable)'

0 commit comments

Comments
 (0)