Skip to content

Commit 507ca5d

Browse files
committed
chore: use last version of stub-gen
1 parent 69f7e14 commit 507ca5d

8 files changed

Lines changed: 102 additions & 142 deletions

File tree

Cargo.lock

Lines changed: 20 additions & 123 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ crate-type = ["cdylib", "rlib"]
1515
# Python bindings
1616
pyo3 = ">=0.28.0"
1717
pyo3-async-runtimes = { version = "0.28.0", features = ["tokio-runtime"] }
18-
pyo3-stub-gen = { git = "https://github.com/j03-dev/pyo3-stub-gen", rev = "2bec9c3"}
18+
pyo3-stub-gen = { git = "https://github.com/j03-dev/pyo3-stub-gen", branch = "fix/initialize_not_found_method" }
1919

2020
# Async / Futures
2121
futures-util = "0.3.31"
@@ -47,7 +47,3 @@ rand = "0.10.0-rc.5"
4747
url = "2.5.7"
4848

4949
jsonwebtoken = { version = "10.2.0", features = ["rust_crypto"] }
50-
51-
[features]
52-
default = []
53-
stub-gen = ["pyo3-stub-gen/manual-python-init"]

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

3-
cargo run --bin stub_gen --features="stub-gen"
3+
cargo run --bin stub_gen
44
./.venv/bin/maturin dev --release

oxapy/__init__.pyi

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
11
# This file is automatically generated by pyo3_stub_gen
2-
# ruff: noqa: E501, F401
2+
# ruff: noqa: E501, F401, F403, F405
33

44
import builtins
55
import enum
66
import typing
7-
from oxapy.templating import Template
87
from . import exceptions
98
from . import jwt
109
from . import serializer
1110
from . import templating
11+
__all__ = [
12+
"Catcher",
13+
"CatcherBuilder",
14+
"Cors",
15+
"File",
16+
"FileStreaming",
17+
"HttpServer",
18+
"Redirect",
19+
"Request",
20+
"Response",
21+
"Route",
22+
"Router",
23+
"Session",
24+
"SessionStore",
25+
"Status",
26+
"catcher",
27+
"convert_to_response",
28+
"delete",
29+
"exceptions",
30+
"get",
31+
"head",
32+
"jwt",
33+
"options",
34+
"patch",
35+
"post",
36+
"put",
37+
"render",
38+
"send_file",
39+
"serializer",
40+
"static_file",
41+
"templating",
42+
]
1243

1344
@typing.final
1445
class Catcher:
@@ -87,7 +118,7 @@ class Cors:
87118
List of allowed origins, default is ["*"] (all origins)
88119
"""
89120
@origins.setter
90-
def origins(self, value: builtins.list[builtins.str]) -> None:
121+
def origins(self, value: typing.Sequence[builtins.str]) -> None:
91122
r"""
92123
List of allowed origins, default is ["*"] (all origins)
93124
"""
@@ -97,7 +128,7 @@ class Cors:
97128
List of allowed HTTP methods, default includes common methods
98129
"""
99130
@methods.setter
100-
def methods(self, value: builtins.list[builtins.str]) -> None:
131+
def methods(self, value: typing.Sequence[builtins.str]) -> None:
101132
r"""
102133
List of allowed HTTP methods, default includes common methods
103134
"""
@@ -107,7 +138,7 @@ class Cors:
107138
List of allowed HTTP headers, default includes common headers
108139
"""
109140
@headers.setter
110-
def headers(self, value: builtins.list[builtins.str]) -> None:
141+
def headers(self, value: typing.Sequence[builtins.str]) -> None:
111142
r"""
112143
List of allowed HTTP headers, default includes common headers
113144
"""
@@ -476,7 +507,7 @@ class HttpServer:
476507
server.session_store(SessionStore())
477508
```
478509
"""
479-
def template(self, template: Template) -> HttpServer:
510+
def template(self, template: templating.Template) -> HttpServer:
480511
r"""
481512
Enable template rendering for the server.
482513

oxapy/exceptions/__init__.pyi

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# This file is automatically generated by pyo3_stub_gen
2-
# ruff: noqa: E501, F401
2+
# ruff: noqa: E501, F401, F403, F405
33

44
import builtins
55
import typing
6+
__all__ = [
7+
"BadRequestError",
8+
"ClientError",
9+
"ConflictError",
10+
"ForbiddenError",
11+
"InternalError",
12+
"NotFoundError",
13+
"UnauthorizedError",
14+
]
615

716
@typing.final
817
class BadRequestError(ClientError):

0 commit comments

Comments
 (0)