Skip to content

Commit ea040d5

Browse files
KrzysztofCzapladanihodovic
authored andcommitted
Type Hints and Copyright Year
1 parent 1e7f060 commit ea040d5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

django_webhook/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, signal: ModelSignal, signal_name: str, model_cls: models.Mode
2828
self.model_cls = model_cls
2929

3030
# pylint: disable=unused-argument
31-
def run(self, sender, created=False, instance=None, **kwargs):
31+
def run(self, sender, created: bool = False, instance=None, **kwargs):
3232
action_type = None
3333
match self.signal_name:
3434
case "post_save" if created:

django_webhook/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
retry_backoff_max=60 * 60,
2222
retry_jitter=False,
2323
)
24-
def fire_webhook(self, webhook_id, payload):
24+
def fire_webhook(self, webhook_id: int, payload: dict):
2525
webhook = Webhook.objects.get(id=webhook_id)
2626
if not webhook.active:
2727
logging.warning(f"Webhook: {webhook} is inactive and I will not fire it.")

django_webhook/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.core.exceptions import ValidationError
33

44

5-
def validate_topic_model(value):
5+
def validate_topic_model(value: str):
66
webhook_settings = getattr(settings, "DJANGO_WEBHOOK", {})
77
allowed_models = webhook_settings.get("MODELS", [])
88
if not webhook_settings or not allowed_models:

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# -- Project information
44

55
project = "django-webhook"
6-
copyright = "2023, Dani Hodovic" # pylint: disable=redefined-builtin
6+
copyright = "2024, Dani Hodovic" # pylint: disable=redefined-builtin
77
author = "Dani Hodovic"
88

99
release = "0.0.7"

0 commit comments

Comments
 (0)