Skip to content

Commit

Permalink
Test against 3.12 beta 2
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Jun 15, 2023
1 parent a021cc8 commit 483a4b3
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 172 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Expand Up @@ -13,12 +13,12 @@ concurrency:
jobs:
test:
name: test with CPython ${{ matrix.py }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.12.0-alpha.7"
- "3.12.0-beta.2"
- "3.11"
- "3.10"
- "3.9"
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:

coverage:
name: Combine coverage
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

check:
name: tox env ${{ matrix.tox_env }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
release:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/sphinx-autodoc-typehints
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Expand Up @@ -45,11 +45,13 @@ optional-dependencies.docs = [
"sphinx>=7.0.1",
"sphinx-autodoc-typehints>=1.23.4",
]
optional-dependencies.numpy = [
"nptyping>=2.5",
]
optional-dependencies.testing = [
"covdefaults>=2.3",
"coverage>=7.2.7",
"diff-cover>=7.5",
"nptyping>=2.5",
"pytest>=7.3.1",
"pytest-cov>=4.1",
"sphobjinv>=2.3.1",
Expand Down Expand Up @@ -84,7 +86,7 @@ paths.source = [
"*/src",
"*\\src",
]
report.fail_under = 81
report.fail_under = 85
report.omit = []
run.parallel = true
run.plugins = ["covdefaults"]
Expand Down
2 changes: 1 addition & 1 deletion src/sphinx_autodoc_typehints/__init__.py
Expand Up @@ -244,7 +244,7 @@ def format_annotation(annotation: Any, config: Config) -> str: # noqa: C901, PL
fmt = [format_annotation(arg, config) for arg in args]
formatted_args = f"\\[\\[{', '.join(fmt[:-1])}], {fmt[-1]}]"
elif full_name == "typing.Literal":
formatted_args = "\\[{}]".format(", ".join(f"``{arg!r}``" for arg in args))
formatted_args = f"\\[{', '.join(f'``{arg!r}``' for arg in args)}]"
elif full_name == "types.UnionType":
return " | ".join([format_annotation(arg, config) for arg in args])

Expand Down

0 comments on commit 483a4b3

Please sign in to comment.