Skip to content

Commit 21c2b72

Browse files
committed
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.
1 parent 9d096e0 commit 21c2b72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: git/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ def list_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> IterableList[T_I
12851285

12861286

12871287
class IterableClassWatcher(type):
1288-
"""Metaclass that issues :class:`DeprecationWarning` when :class:`git.util.Iterable`
1288+
"""Metaclass that issues :exc:`DeprecationWarning` when :class:`git.util.Iterable`
12891289
is subclassed."""
12901290

12911291
def __init__(cls, name: str, bases: Tuple, clsdict: Dict) -> None:

0 commit comments

Comments
 (0)