Skip to content

Commit

Permalink
Use the :exc: Sphinx role for DeprecationWarning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Mar 28, 2024
1 parent 9d096e0 commit 21c2b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 21c2b72

Please sign in to comment.