Skip to content

Commit 20950c4

Browse files
committed
Changed actions
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent 8e754b6 commit 20950c4

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
- uses: actions/setup-python@v4
1919
with:
2020
python-version: '3.10'
21+
- name: Test
22+
run: yum install perl-IPC-Cmd
2123
- name: Build wheels
2224
uses: PyO3/maturin-action@v1
2325
with:

src/Untitled-1.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
3+
from typing import Protocol, Sequence
4+
5+
6+
class DbModel(Protocol):
7+
def make_request(self) -> Sequence:
8+
...
9+
10+
11+
class Postgres(DbModel):
12+
def make_request(self) -> Sequence:
13+
return ["123", "456"]
14+
15+
16+
class MySQL(DbModel):
17+
def make_request(self) -> Sequence:
18+
return ("123", "456")
19+
20+
21+
class Requester:
22+
23+
def __init__(self, database: DbModel) -> None:
24+
self.database: DbModel = database
25+
26+
27+
req = Requester()
28+
req.database.make_request()

0 commit comments

Comments
 (0)