Skip to content

Commit dfbaa78

Browse files
committed
CI: flake8 action added
1 parent 4874b89 commit dfbaa78

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/run_linter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test Python SDK
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
branches: [ main ]
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.11
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install flake8
24+
- name: Lint with flake8
25+
run: |
26+
flake8 */ --count --max-complexity=10 --max-line-length=120 --statistics
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from sinch import SinchClient
2+
from sinch.domains.verification.models import VerificationIdentity
3+
4+
sinch_client = SinchClient(
5+
application_key="YOUR_application_key",
6+
application_secret="YOUR_application_secret"
7+
)
8+
9+
response = sinch_client.verification.verifications.start_sms(
10+
identity=VerificationIdentity(
11+
type="number",
12+
endpoint="YOUR_phone_number"
13+
)
14+
)
15+
print(response)

0 commit comments

Comments
 (0)