Skip to content

Commit 9d01507

Browse files
authored
Upgrades and add scheduled tests (#193)
1 parent 24dffc5 commit 9d01507

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
full-build:
3737
name: Full 3.13 build
38-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v2
4141
- name: Set up Python

.github/workflows/scheduled.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Scheduled to verify that tests pass with latest requirements.
2+
3+
name: scheduled
4+
on:
5+
schedule:
6+
- cron: "0 8 * * *"
7+
8+
jobs:
9+
auth-test:
10+
name: Pytest suite
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.13"
19+
- name: Install package
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements/dev
23+
pip install .
24+
- name: Run tox evironments
25+
run: tox

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[build-system]
2-
requires = ["setuptools>=61.0", "wheel"]
2+
requires = ["setuptools>=77.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "sphinx-codeautolink"
77
description = "Automatic links from code examples to reference documentation."
88
readme = "readme_pypi.rst"
9-
license = {file = "LICENSE"}
9+
license-files = ["LICENSE"]
1010
dynamic = ["version"]
1111

1212
requires-python = ">=3.10"

src/sphinx_codeautolink/extension/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def wrapper(*args, **kwargs):
5252
source = doctree["source"]
5353
msg = f"in document `{source}`"
5454
if e.args:
55-
e.args = (e.args[0] + f" ({msg})",) + e.args[1:]
55+
e.args = (e.args[0] + f" ({msg})", *e.args[1:])
5656
else:
5757
e.args = (f"Unexpected error {msg}",)
5858
raise

src/sphinx_codeautolink/extension/block.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def _exclude_ipython_output(source: str) -> str:
8888

8989
def clean_ipython(source: str) -> tuple[str, str]:
9090
"""Clean up IPython magics and console syntax to pure Python."""
91-
from IPython.core.inputtransformer2 import TransformerManager
91+
from IPython.core.inputtransformer2 import TransformerManager # noqa: PLC0415
9292

9393
clean = _exclude_ipython_output(source)
9494
return source, TransformerManager().transform_cell(clean)

tests/extension/src/future_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Foo:
1010
attr: str = "test"
1111

1212

13-
def optional() -> Optional[Foo]: # noqa: UP007
13+
def optional() -> Optional[Foo]: # noqa: UP045
1414
"""Return optional type."""
1515

1616

0 commit comments

Comments
 (0)