File tree Expand file tree Collapse file tree 13 files changed +173
-162
lines changed
Expand file tree Collapse file tree 13 files changed +173
-162
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,10 @@ jobs:
2828 shell : bash
2929
3030 steps :
31- - uses : actions/checkout@v3
32- - uses : actions /setup-python@v3
31+ - uses : actions/checkout@v4
32+ - uses : eifinger /setup-rye@v2
3333 with :
34- python-version : ${{ matrix.python-version }}
35- cache : " pip"
34+ enable-cache : true
3635
3736 - name : Setup
3837 run : ./script/setup
Original file line number Diff line number Diff line change 1+ 3.12.2
Original file line number Diff line number Diff line change @@ -16,20 +16,22 @@ dependencies = [
1616 " pydantic>1.10.7" ,
1717 " typing_extensions>=4.5.0" ,
1818]
19- optional-dependencies = { dev = [
20- " pylint" ,
21- " pyright" ,
22- " pytest" ,
23- " pytest-asyncio" ,
24- " pytest-recording" ,
25- " respx" ,
26- " ruff>=0.3.3" ,
27- ] }
2819
2920[project .urls ]
3021homepage = " https://replicate.com"
3122repository = " https://github.com/replicate/replicate-python"
3223
24+ [tool ]
25+ rye = { dev-dependencies = [
26+ " pytest>=8.1.1" ,
27+ " pylint>=3.1.0" ,
28+ " pyright>=1.1.358" ,
29+ " pytest-asyncio>=0.23.6" ,
30+ " pytest-recording>=0.13.1" ,
31+ " respx>=0.21.1" ,
32+ " ruff>=0.3.7" ,
33+ ] }
34+
3335[tool .pytest .ini_options ]
3436testpaths = " tests/"
3537
Original file line number Diff line number Diff line change 11from importlib .metadata import version
22
3- __version__ = version (__package__ )
3+ __version__ = version (__package__ if __package__ is not None else "replicate" )
Original file line number Diff line number Diff line change @@ -253,8 +253,7 @@ def output_iterator(self) -> Iterator[Any]:
253253
254254 output = self .output or []
255255 new_output = output [len (previous_output ) :]
256- for output in new_output :
257- yield output
256+ yield from new_output
258257
259258 async def async_output_iterator (self ) -> AsyncIterator [Any ]:
260259 """
Original file line number Diff line number Diff line change 1+ # generated by rye
2+ # use `rye lock` or `rye sync` to update this lockfile
3+ #
4+ # last locked with the following flags:
5+ # pre: false
6+ # features: []
7+ # all-features: false
8+ # with-sources: false
9+
10+ -e file:.
11+ annotated-types==0.6.0
12+ # via pydantic
13+ anyio==4.3.0
14+ # via httpx
15+ astroid==3.1.0
16+ # via pylint
17+ certifi==2024.2.2
18+ # via httpcore
19+ # via httpx
20+ dill==0.3.8
21+ # via pylint
22+ h11==0.14.0
23+ # via httpcore
24+ httpcore==1.0.5
25+ # via httpx
26+ httpx==0.27.0
27+ # via replicate
28+ # via respx
29+ idna==3.7
30+ # via anyio
31+ # via httpx
32+ # via yarl
33+ iniconfig==2.0.0
34+ # via pytest
35+ isort==5.13.2
36+ # via pylint
37+ mccabe==0.7.0
38+ # via pylint
39+ multidict==6.0.5
40+ # via yarl
41+ nodeenv==1.8.0
42+ # via pyright
43+ packaging==24.0
44+ # via pytest
45+ # via replicate
46+ platformdirs==4.2.0
47+ # via pylint
48+ pluggy==1.4.0
49+ # via pytest
50+ pydantic==2.7.0
51+ # via replicate
52+ pydantic-core==2.18.1
53+ # via pydantic
54+ pylint==3.1.0
55+ pyright==1.1.358
56+ pytest==8.1.1
57+ # via pytest-asyncio
58+ # via pytest-recording
59+ pytest-asyncio==0.23.6
60+ pytest-recording==0.13.1
61+ pyyaml==6.0.1
62+ # via vcrpy
63+ respx==0.21.1
64+ ruff==0.3.7
65+ setuptools==69.2.0
66+ # via nodeenv
67+ sniffio==1.3.1
68+ # via anyio
69+ # via httpx
70+ tomlkit==0.12.4
71+ # via pylint
72+ typing-extensions==4.11.0
73+ # via pydantic
74+ # via pydantic-core
75+ # via replicate
76+ vcrpy==6.0.1
77+ # via pytest-recording
78+ wrapt==1.16.0
79+ # via vcrpy
80+ yarl==1.9.4
81+ # via vcrpy
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # generated by rye
2+ # use `rye lock` or `rye sync` to update this lockfile
3+ #
4+ # last locked with the following flags:
5+ # pre: false
6+ # features: []
7+ # all-features: false
8+ # with-sources: false
9+
10+ -e file:.
11+ annotated-types==0.6.0
12+ # via pydantic
13+ anyio==4.3.0
14+ # via httpx
15+ certifi==2024.2.2
16+ # via httpcore
17+ # via httpx
18+ h11==0.14.0
19+ # via httpcore
20+ httpcore==1.0.5
21+ # via httpx
22+ httpx==0.27.0
23+ # via replicate
24+ idna==3.7
25+ # via anyio
26+ # via httpx
27+ packaging==24.0
28+ # via replicate
29+ pydantic==2.7.0
30+ # via replicate
31+ pydantic-core==2.18.1
32+ # via pydantic
33+ sniffio==1.3.1
34+ # via anyio
35+ # via httpx
36+ typing-extensions==4.11.0
37+ # via pydantic
38+ # via pydantic-core
39+ # via replicate
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/sh
22
33set -e
44
5- python -m ruff format .
5+ exec rye fmt .
You can’t perform that action at this time.
0 commit comments