Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7dec7d

Browse filesBrowse files
committed
Have the deprecated Diff.renamed property issue a warning
1 parent 2382891 commit e7dec7d
Copy full SHA for e7dec7d

File tree

1 file changed

+6
-0
lines changed
Filter options

1 file changed

+6
-0
lines changed

‎git/diff.py

Copy file name to clipboardExpand all lines: git/diff.py
+6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.