Skip to content

Commit 49750d7

Browse files
committed
Bump precommit and some actions.
1 parent 3879545 commit 49750d7

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

.github/workflows/github-actions.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ jobs:
581581
with:
582582
parallel: true
583583
flag-name: ${{ matrix.tox_env }}
584-
- uses: codecov/codecov-action@v3
584+
- uses: codecov/codecov-action@v5
585585
if: matrix.cover
586586
with:
587587
verbose: true
@@ -590,7 +590,7 @@ jobs:
590590
if: matrix.cibw_build
591591
run: twine check wheelhouse/*.whl
592592
- name: upload wheel
593-
uses: actions/upload-artifact@v3
593+
uses: actions/upload-artifact@v4
594594
if: matrix.cibw_build
595595
with:
596596
path: wheelhouse/*.whl
@@ -602,6 +602,6 @@ jobs:
602602
- uses: coverallsapp/github-action@v2
603603
with:
604604
parallel-finished: true
605-
- uses: codecov/codecov-action@v3
605+
- uses: codecov/codecov-action@v5
606606
with:
607607
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
66
# Note the order is intentional to avoid multiple passes of the hooks
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.7.4
9+
rev: v0.11.5
1010
hooks:
1111
- id: ruff
1212
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]

ci/templates/.github/workflows/github-actions.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
with:
119119
parallel: true
120120
flag-name: {{ '${{ matrix.tox_env }}' }}
121-
- uses: codecov/codecov-action@v3
121+
- uses: codecov/codecov-action@v5
122122
if: matrix.cover
123123
with:
124124
verbose: true
@@ -127,7 +127,7 @@ jobs:
127127
if: matrix.cibw_build
128128
run: twine check wheelhouse/*.whl
129129
- name: upload wheel
130-
uses: actions/upload-artifact@v3
130+
uses: actions/upload-artifact@v4
131131
if: matrix.cibw_build
132132
with:
133133
path: wheelhouse/*.whl
@@ -139,6 +139,6 @@ jobs:
139139
- uses: coverallsapp/github-action@v2
140140
with:
141141
parallel-finished: true
142-
- uses: codecov/codecov-action@v3
142+
- uses: codecov/codecov-action@v5
143143
with:
144144
CODECOV_TOKEN: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

src/lazy_object_proxy/slots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Proxy(with_metaclass(_ProxyMetaType)):
7777
* calls ``__factory__``, saves result to ``__target__`` and returns said result.
7878
"""
7979

80-
__slots__ = '__target__', '__factory__'
80+
__slots__ = '__factory__', '__target__'
8181

8282
def __init__(self, factory):
8383
object.__setattr__(self, '__factory__', factory)

src/lazy_object_proxy/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ def await_(obj):
1616
obj_type = type(obj)
1717
if (
1818
obj_type is CoroutineType
19-
or obj_type is GeneratorType
20-
and bool(obj.gi_code.co_flags & CO_ITERABLE_COROUTINE)
19+
or (obj_type is GeneratorType and bool(obj.gi_code.co_flags & CO_ITERABLE_COROUTINE))
2120
or isinstance(obj, Awaitable)
2221
):
2322
return do_await(obj).__await__()

tests/test_async_py3.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ async def foo():
857857
async with lop.Proxy(CM):
858858
pass
859859

860-
with pytest.raises(TypeError, match="'async with' received an object from __aenter__ " 'that does not implement __await__: int'):
860+
with pytest.raises(TypeError, match="'async with' received an object from __aenter__ that does not implement __await__: int"):
861861
# it's important that __aexit__ wasn't called
862862
run_async(lop.Proxy(foo))
863863

@@ -879,7 +879,7 @@ async def foo():
879879
try:
880880
run_async(lop.Proxy(foo))
881881
except TypeError as exc:
882-
assert re.search("'async with' received an object from __aexit__ " 'that does not implement __await__: int', exc.args[0])
882+
assert re.search("'async with' received an object from __aexit__ that does not implement __await__: int", exc.args[0])
883883
assert exc.__context__ is not None
884884
assert isinstance(exc.__context__, ZeroDivisionError)
885885
else:
@@ -903,7 +903,7 @@ async def foo():
903903
async with lop.Proxy(CM):
904904
CNT += 1
905905

906-
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ " 'that does not implement __await__: int'):
906+
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ that does not implement __await__: int"):
907907
run_async(lop.Proxy(foo))
908908
assert CNT == 1
909909

@@ -915,7 +915,7 @@ async def foo():
915915
CNT += 1
916916
break
917917

918-
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ " 'that does not implement __await__: int'):
918+
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ that does not implement __await__: int"):
919919
run_async(lop.Proxy(foo))
920920
assert CNT == 2
921921

@@ -927,7 +927,7 @@ async def foo():
927927
CNT += 1
928928
continue
929929

930-
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ " 'that does not implement __await__: int'):
930+
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ that does not implement __await__: int"):
931931
run_async(lop.Proxy(foo))
932932
assert CNT == 3
933933

@@ -938,7 +938,7 @@ async def foo():
938938
CNT += 1
939939
return
940940

941-
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ " 'that does not implement __await__: int'):
941+
with pytest.raises(TypeError, match="'async with' received an object from __aexit__ that does not implement __await__: int"):
942942
run_async(lop.Proxy(foo))
943943
assert CNT == 4
944944

0 commit comments

Comments
 (0)