Skip to content

Commit c44b8b0

Browse files
authored
update dev (#1507)
1 parent e140354 commit c44b8b0

File tree

11 files changed

+214
-223
lines changed

11 files changed

+214
-223
lines changed

.github/workflows/build-docset.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
docset:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
fetch-depth: 0
2323
persist-credentials: false
24-
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
24+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2525
with:
2626
python-version: "3.x"
2727
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424

2525
steps:
26-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
with:
2828
fetch-depth: 0
2929
persist-credentials: false
@@ -54,7 +54,7 @@ jobs:
5454
name: Packages
5555
path: dist
5656
- run: tar xf dist/*.tar.gz --strip-components=1
57-
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
57+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5858
with:
5959
python-version: ${{ matrix.python-version }}
6060
allow-prereleases: true
@@ -183,7 +183,7 @@ jobs:
183183
name: Check types using supported type checkers
184184
runs-on: ubuntu-latest
185185
steps:
186-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
186+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
187187
with:
188188
persist-credentials: false
189189
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0
@@ -198,7 +198,7 @@ jobs:
198198
runs-on: ubuntu-latest
199199

200200
steps:
201-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
201+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
202202
with:
203203
persist-credentials: false
204204
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2828
with:
2929
persist-credentials: false
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
32+
uses: github/codeql-action/init@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
3333
with:
3434
languages: ${{ matrix.language }}
3535

3636
- name: Autobuild
37-
uses: github/codeql-action/autobuild@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
37+
uses: github/codeql-action/autobuild@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
40+
uses: github/codeql-action/analyze@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0

.github/workflows/codspeed.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
runs-on: ubuntu-latest
3131

3232
steps:
33-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3434
with:
3535
persist-credentials: false
36-
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
36+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3737
with:
3838
python-version-file: .python-version-default
3939
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0
4040

4141
- name: Run CodSpeed benchmarks
42-
uses: CodSpeedHQ/action@0700edb451d0e9f2426f99bd6977027e550fb2a6 # v4.7.0
42+
uses: CodSpeedHQ/action@ac0b0207a067aeb38de75cda57d2662345cac92a # v4.10.0
4343
with:
4444
mode: instrumentation
4545
token: ${{ secrets.CODSPEED_TOKEN }}

.github/workflows/pinact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
contents: write
1616

1717
steps:
18-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1919
with:
2020
persist-credentials: false
2121

.github/workflows/pypi-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id-token: write
2222

2323
steps:
24-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
with:
2626
fetch-depth: 0
2727
persist-credentials: false

.github/workflows/zizmor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
security-events: write
2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
persist-credentials: false
2525
- uses: hynek/setup-cached-uv@757bedc3f972eb7227a1aa657651f15a8527c817 # v2.3.0
@@ -30,7 +30,7 @@ jobs:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131

3232
- name: Upload SARIF file
33-
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
33+
uses: github/codeql-action/upload-sarif@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
3434
with:
3535
# Path to SARIF file relative to the root of the repository
3636
sarif_file: results.sarif

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: v0.14.13
7+
rev: v0.15.0
88
hooks:
99
- id: ruff-check
1010
args: [--fix, --exit-non-zero-on-fix]
@@ -23,7 +23,7 @@ repos:
2323
args: [--exclude-file=tests/test_mypy.yml, --skip=*.svg]
2424

2525
- repo: https://github.com/abravalheri/validate-pyproject
26-
rev: v0.24.1
26+
rev: v0.25
2727
hooks:
2828
- id: validate-pyproject
2929
# Optional extra validations from SchemaStore:

src/attr/_make.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def _frozen_delattrs(self, name):
569569
"""
570570
Attached to frozen classes as __delattr__.
571571
"""
572-
if isinstance(self, BaseException) and name in ("__notes__",):
572+
if isinstance(self, BaseException) and name == "__notes__":
573573
BaseException.__delattr__(self, name)
574574
return
575575

@@ -1096,9 +1096,7 @@ def _attach_init(cls_dict, globs):
10961096
return self
10971097

10981098
def add_replace(self):
1099-
self._cls_dict["__replace__"] = self._add_method_dunders(
1100-
lambda self, **changes: evolve(self, **changes)
1101-
)
1099+
self._cls_dict["__replace__"] = self._add_method_dunders(evolve)
11021100
return self
11031101

11041102
def add_match_args(self):
@@ -3087,9 +3085,7 @@ def __init__(self, converter, *, takes_self=False, takes_field=False):
30873085
value, field
30883086
)
30893087
else:
3090-
self.__call__ = lambda value, instance, field: self.converter(
3091-
value, instance, field
3092-
)
3088+
self.__call__ = self.converter
30933089

30943090
rt = ex.get_return_type()
30953091
if rt is not None:

tests/test_make.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ def v():
116116

117117
assert v == a._validator
118118

119-
@pytest.mark.parametrize(
120-
"wrap", [lambda v: v, lambda v: [v], lambda v: and_(v)]
121-
)
119+
@pytest.mark.parametrize("wrap", [lambda v: v, lambda v: [v], and_])
122120
def test_validator_decorator(self, wrap):
123121
"""
124122
If _CountingAttr.validator is used as a decorator and there is already
@@ -1775,9 +1773,7 @@ def test_frozen(self):
17751773
"""
17761774
Converters circumvent immutability.
17771775
"""
1778-
C = make_class(
1779-
"C", {"x": attr.ib(converter=lambda v: int(v))}, frozen=True
1780-
)
1776+
C = make_class("C", {"x": attr.ib(converter=int)}, frozen=True)
17811777
C("1")
17821778

17831779

0 commit comments

Comments
 (0)