Skip to content

Commit e7dec7d

Browse files
committed
Have the deprecated Diff.renamed property issue a warning
1 parent 2382891 commit e7dec7d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git/diff.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import enum
99
import re
10+
import warnings
1011

1112
from git.cmd import handle_process_output
1213
from git.compat import defenc
@@ -554,6 +555,11 @@ def renamed(self) -> bool:
554555
This property is deprecated.
555556
Please use the :attr:`renamed_file` property instead.
556557
"""
558+
warnings.warn(
559+
"Diff.renamed is deprecated, use Diff.renamed_file instead",
560+
DeprecationWarning,
561+
stacklevel=2,
562+
)
557563
return self.renamed_file
558564

559565
@property

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