Skip to content

Commit 8654084

Browse files
committed
add docs for @Tracked
1 parent a978e83 commit 8654084

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mypy/messages.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@
182182

183183

184184
def tracked(id: Optional[str] = None) -> Callable[[T], T]:
185+
"""Identify a MessageBuilder method that represents a message to be tracked.
186+
187+
Arguments:
188+
id: provide an explicit message id. by default, if this is not provided the message id is the name of the method
189+
"""
185190
def deco(func: T) -> T:
186191
msg_id = id if id is not None else func.__name__
187192
_message_ids.add(msg_id)

0 commit comments

Comments
 (0)