Skip to content

Commit b983fb0

Browse files
build(deps): bump actions/attest-build-provenance from 2.3.0 to 2.4.0 in the actions group (#25)
* build(deps): bump actions/attest-build-provenance in the actions group Bumps the actions group with 1 update: [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance). Updates `actions/attest-build-provenance` from 2.3.0 to 2.4.0 - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](actions/attest-build-provenance@v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: actions/attest-build-provenance dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> * ci: update settings * ci: update python setup Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
1 parent 19c5340 commit b983fb0

7 files changed

Lines changed: 1320 additions & 39 deletions

File tree

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
path: dist
5151

5252
- name: Generate artifact attestation for sdist and wheel
53-
uses: actions/attest-build-provenance@v2.3.0
53+
uses: actions/attest-build-provenance@v2.4.0
5454
with:
5555
subject-path: "dist/*"
5656

.github/workflows/ci.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
- uses: actions/setup-python@v5
28-
with:
29-
python-version: "3.x"
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
- name: Install the project
28+
run: uv sync --locked --group test
29+
3030
- uses: pre-commit/action@v3.0.1
3131
with:
3232
extra_args: --hook-stage manual --all-files
3333
- name: Run PyLint
34-
run: pipx run nox -s pylint -- --output-format=github
34+
run: uv run --frozen nox -s pylint -- --output-format=github
3535

3636
checks:
3737
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
@@ -43,26 +43,16 @@ jobs:
4343
python-version: ["3.9", "3.13"]
4444
runs-on: [ubuntu-latest, windows-latest, macos-14]
4545

46-
include:
47-
- python-version: "pypy-3.10"
48-
runs-on: ubuntu-latest
49-
5046
steps:
5147
- uses: actions/checkout@v4
52-
with:
53-
fetch-depth: 0
54-
55-
- uses: actions/setup-python@v5
56-
with:
57-
python-version: ${{ matrix.python-version }}
58-
allow-prereleases: true
59-
60-
- name: Install package
61-
run: python -m pip install .[test]
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@v6
50+
- name: Install the project
51+
run: uv sync --locked --group test
6252

6353
- name: Test package
6454
run: >-
65-
python -m pytest -ra --cov --cov-report=xml --cov-report=term
55+
uv run --frozen pytest --cov --cov-report=xml --cov-report=term
6656
--durations=20
6757
6858
- name: Upload coverage report

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1 align='center'> <code>is_annotated</code> </h1>
2-
<h2 align="center">Check if an object is an <code>Annotated</code> type.</h2>
2+
<h3 align="center">Check if an object is an <code>Annotated</code> type.</h3>
33

44
This is a micro-package, containing the single function `isannotated` to check
55
if a type hint is an `Annotated` type. `Annotated` objects can't be checked by

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
nox.needs_version = ">=2024.3.2"
1111
nox.options.sessions = ["lint", "pylint", "tests"]
12-
nox.options.default_venv_backend = "uv|virtualenv"
12+
nox.options.default_venv_backend = "uv"
1313

1414

1515
@nox.session

pyproject.toml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,22 @@
3232
readme = "README.md"
3333
requires-python = ">=3.9"
3434

35-
[project.optional-dependencies]
36-
dev = ["is_annotated[test]"]
37-
test = [
38-
"optional_dependencies >= 0.3",
39-
"pytest >=6",
40-
"pytest-cov >=3",
41-
"pytest-github-actions-annotate-failures",
42-
"sybil",
43-
]
35+
[dependency-groups]
36+
dev = [
37+
"cz-conventional-gitmoji>=0.6.1",
38+
"ipykernel>=6.29.5",
39+
"pre-commit>=4.0.1",
40+
"uv>=0.6.4",
41+
{ include-group = "test" },
42+
]
43+
test = [
44+
"optional_dependencies >= 0.3",
45+
"pytest >=6",
46+
"pytest-cov >=3",
47+
"pytest-github-actions-annotate-failures",
48+
"sybil",
49+
"nox"
50+
]
4451

4552
[project.urls]
4653
"Bug Tracker" = "https://github.com/GalacticDynamics/is_annotated/issues"
@@ -67,7 +74,7 @@
6774
filterwarnings = ["error"]
6875
log_cli_level = "INFO"
6976
minversion = "6.0"
70-
testpaths = ["tests/", "src/"]
77+
testpaths = ["src/", "tests/"]
7178
xfail_strict = true
7279

7380

@@ -103,18 +110,18 @@
103110
"PLR09", # Too many <...>
104111
"PLR2004", # Magic value used in comparison
105112
"TD002", # Missing author in TODO
106-
"TD003" # Missing issue link on the line following this TODO
113+
"TD003", # Missing issue link on the line following this TODO
107114
]
108115

109116
[tool.ruff.lint.per-file-ignores]
110117
"noxfile.py" = ["T20"]
111118
"tests/**" = ["ANN", "INP001", "S101", "T20"]
112119

113120
[tool.ruff.lint.isort]
114-
combine-as-imports = true
121+
combine-as-imports = true
115122
extra-standard-library = ["typing_extensions"]
116-
known-first-party = ["optional_dependencies"]
117-
known-local-folder = ["is_annotated"]
123+
known-first-party = ["optional_dependencies"]
124+
known-local-folder = ["is_annotated"]
118125

119126

120127
[tool.pylint]

src/is_annotated/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
__all__ = ["isannotated"]
77

88
from typing import Annotated
9-
from typing_extensions import TypeGuard, _AnnotatedAlias
9+
from typing_extensions import ( # pylint: disable=no-name-in-module
10+
TypeGuard,
11+
_AnnotatedAlias,
12+
)
1013

1114
AnnotationType = type(Annotated[int, "_"])
1215

0 commit comments

Comments
 (0)