Skip to content

Commit 178a549

Browse files
authored
Test against 3.12 beta 2 (#360)
1 parent a021cc8 commit 178a549

File tree

6 files changed

+185
-172
lines changed

6 files changed

+185
-172
lines changed

.github/workflows/check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ concurrency:
1313
jobs:
1414
test:
1515
name: test with CPython ${{ matrix.py }}
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-latest
1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
py:
21-
- "3.12.0-alpha.7"
21+
- "3.12.0-beta.2"
2222
- "3.11"
2323
- "3.10"
2424
- "3.9"
@@ -68,7 +68,7 @@ jobs:
6868

6969
coverage:
7070
name: Combine coverage
71-
runs-on: ubuntu-22.04
71+
runs-on: ubuntu-latest
7272
needs: test
7373
steps:
7474
- uses: actions/checkout@v3
@@ -100,7 +100,7 @@ jobs:
100100

101101
check:
102102
name: tox env ${{ matrix.tox_env }}
103-
runs-on: ubuntu-22.04
103+
runs-on: ubuntu-latest
104104
strategy:
105105
fail-fast: false
106106
matrix:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
release:
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-latest
99
environment:
1010
name: release
1111
url: https://pypi.org/p/sphinx-autodoc-typehints

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ optional-dependencies.docs = [
4545
"sphinx>=7.0.1",
4646
"sphinx-autodoc-typehints>=1.23.4",
4747
]
48+
optional-dependencies.numpy = [
49+
"nptyping>=2.5",
50+
]
4851
optional-dependencies.testing = [
4952
"covdefaults>=2.3",
5053
"coverage>=7.2.7",
5154
"diff-cover>=7.5",
52-
"nptyping>=2.5",
5355
"pytest>=7.3.1",
5456
"pytest-cov>=4.1",
5557
"sphobjinv>=2.3.1",
@@ -84,7 +86,7 @@ paths.source = [
8486
"*/src",
8587
"*\\src",
8688
]
87-
report.fail_under = 81
89+
report.fail_under = 85
8890
report.omit = []
8991
run.parallel = true
9092
run.plugins = ["covdefaults"]

src/sphinx_autodoc_typehints/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def format_annotation(annotation: Any, config: Config) -> str: # noqa: C901, PL
244244
fmt = [format_annotation(arg, config) for arg in args]
245245
formatted_args = f"\\[\\[{', '.join(fmt[:-1])}], {fmt[-1]}]"
246246
elif full_name == "typing.Literal":
247-
formatted_args = "\\[{}]".format(", ".join(f"``{arg!r}``" for arg in args))
247+
formatted_args = f"\\[{', '.join(f'``{arg!r}``' for arg in args)}]"
248248
elif full_name == "types.UnionType":
249249
return " | ".join([format_annotation(arg, config) for arg in args])
250250

0 commit comments

Comments
 (0)