Skip to content

Commit 679d2e8

Browse files
committed
Fix exception type in require_remote_ref_path docstring
The require_remote_ref_path decorator has always used ValueError (ever since its introduction in a92ab80) but was documented as using TypeError. ValueError is the correct exception to raise here, since this is not any kind of type error or related condition. So the bug wasn't in the function's behavior, but instead in the way that behavior was documented. (The bug was fairly minor, since the function is not listed in __all__.)
1 parent 254c82a commit 679d2e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/refs/reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
def require_remote_ref_path(func: Callable[..., _T]) -> Callable[..., _T]:
28-
"""A decorator raising :class:`TypeError` if we are not a valid remote, based on the
28+
"""A decorator raising :class:`ValueError` if we are not a valid remote, based on the
2929
path."""
3030

3131
def wrapper(self: T_References, *args: Any) -> _T:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy