Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb434f8

Browse filesBrowse files
committed
Configure tooling for manual developments
1 parent 6426a89 commit eb434f8
Copy full SHA for eb434f8

File tree

5 files changed

+41
-5
lines changed
Filter options

5 files changed

+41
-5
lines changed

‎.genignore

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
.zed/
12
src/polar_sdk/webhooks/
23
src/tests/
4+
ruff.toml

‎.zed/settings.json

Copy file name to clipboard
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"languages": {
3+
"Python": {
4+
"language_servers": ["pyright", "ruff", "!pylsp"],
5+
"format_on_save": "on",
6+
"wrap_guides": [88],
7+
"formatter": [
8+
{
9+
"code_actions": {
10+
"source.organizeImports.ruff": true,
11+
"source.fixAll.ruff": true
12+
}
13+
},
14+
{
15+
"language_server": {
16+
"name": "ruff"
17+
}
18+
}
19+
]
20+
}
21+
},
22+
"lsp": {
23+
"pyright": {
24+
"settings": {
25+
"python": {
26+
"pythonPath": ".venv/bin/python"
27+
}
28+
}
29+
}
30+
}
31+
}

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,3 @@ ignore_missing_imports = true
5757
[tool.pyright]
5858
venvPath = "."
5959
venv = ".venv"
60-
61-

‎ruff.toml

Copy file name to clipboard
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
target-version = "py39"
2+
3+
include = ["src/polar_sdk/webhooks/**/*.py"]
4+
5+
[lint]
6+
extend-select = ["I", "UP", "T20"]

‎src/polar_sdk/webhooks/__init__.py

Copy file name to clipboardExpand all lines: src/polar_sdk/webhooks/__init__.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import base64
2-
from typing import Any, Dict, Union
2+
from typing import Annotated, Any, Union
33

44
from pydantic import Discriminator, Tag, TypeAdapter
55
from standardwebhooks.webhooks import Webhook
66
from standardwebhooks.webhooks import (
77
WebhookVerificationError as _WebhookVerificationError,
88
)
9-
from typing_extensions import Annotated
109

1110
from polar_sdk.models import (
1211
WebhookBenefitCreatedPayload,
@@ -88,7 +87,7 @@ def __init__(self, message: str) -> None:
8887

8988

9089
def validate_event(
91-
body: Union[str, bytes], headers: Dict[str, str], secret: str
90+
body: Union[str, bytes], headers: dict[str, str], secret: str
9291
) -> WebhoookPayload:
9392
base64_secret = base64.b64encode(secret.encode()).decode()
9493
webhook = Webhook(base64_secret)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.