From 21c2b72b019627dba81b35085117b79660567abd Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 28 Mar 2024 01:51:54 -0400 Subject: [PATCH] Use the :exc: Sphinx role for DeprecationWarning Python warnings are exceptions, to facilitate converting them to errors by raising them. Thus the more specific :exc: role applies and is a better fit than the more general :class: role. --- git/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/util.py b/git/util.py index 5839f9720..8c1c26012 100644 --- a/git/util.py +++ b/git/util.py @@ -1285,7 +1285,7 @@ def list_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> IterableList[T_I class IterableClassWatcher(type): - """Metaclass that issues :class:`DeprecationWarning` when :class:`git.util.Iterable` + """Metaclass that issues :exc:`DeprecationWarning` when :class:`git.util.Iterable` is subclassed.""" def __init__(cls, name: str, bases: Tuple, clsdict: Dict) -> None: