Skip to content

Commit 03030c5

Browse files
authored
Add type annotations to public API. Fix #172 (#189)
1 parent 3d777ba commit 03030c5

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 is_pattern_library_context, render_pattern
@@ -8,11 +10,11 @@
810
UNSPECIFIED = object()
911

1012

11-
def override_tag(register, name, default_html=None):
13+
def override_tag(
14+
register: django.template.Library, name: str, default_html: Optional[str] = None
15+
):
1216
"""
1317
An utility that helps you override original tags for use in your pattern library.
14-
15-
Accepts the register argument which should be an instance of django.template.Library.
1618
"""
1719

1820
original_tag = register.tags[name]

pattern_library/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)