Skip to content

Commit 5a65bec

Browse files
committed
Add type annotations to public API. Fix #172
1 parent ce2ca10 commit 5a65bec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pattern_library/monkey_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import logging
2+
from typing import Optional
23

4+
import django
35
from django.template.library import SimpleNode
46

57
from pattern_library.utils import (
@@ -12,11 +14,11 @@
1214
UNSPECIFIED = object()
1315

1416

15-
def override_tag(register, name, default_html=None):
17+
def override_tag(
18+
register: django.template.Library, name: str, default_html: Optional[str] = None
19+
):
1620
"""
1721
An utility that helps you override original tags for use in your pattern library.
18-
19-
Accepts the register argument which should be an instance of django.template.Library.
2022
"""
2123

2224
original_tag = register.tags[name]

pattern_library/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)