Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commite7dec7d

Browse files
committed
Have the deprecated Diff.renamed property issue a warning
1 parent2382891 commite7dec7d

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
importenum
99
importre
10+
importwarnings
1011

1112
fromgit.cmdimporthandle_process_output
1213
fromgit.compatimportdefenc
@@ -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
returnself.renamed_file
558564

559565
@property

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp