Skip to content

Commit 1d3f275

Browse files
committed
Avoid making "END" notation more verbose
This changes the style "END" comments appearing after local function definitions from "END def X" to "END X". Note that this still does not add such comments where they were not present, it only adjusts their style where they already existed.
1 parent ddb4417 commit 1d3f275

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

git/cmd.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ def kill_process(pid: int) -> None:
10481048
pass
10491049
return
10501050

1051-
# END def kill_process
1051+
# END kill_process
10521052

10531053
if kill_after_timeout is not None:
10541054
kill_check = threading.Event()
@@ -1100,7 +1100,7 @@ def kill_process(pid: int) -> None:
11001100
def as_text(stdout_value: Union[bytes, str]) -> str:
11011101
return not output_stream and safe_decode(stdout_value) or "<OUTPUT_STREAM>"
11021102

1103-
# END def as_text
1103+
# END as_text
11041104

11051105
if stderr_value:
11061106
log.info(

git/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def string_decode(v: str) -> str:
450450

451451
return v.encode(defenc).decode("unicode_escape")
452452

453-
# END def string_decode
453+
# END string_decode
454454

455455
while True:
456456
# We assume to read binary!

git/index/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ def handle_null_entries(self: "IndexFile") -> None:
868868
# END for each entry index
869869

870870
# END closure
871+
871872
handle_null_entries(self)
872873
# END null_entry handling
873874

git/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def new_message_handler(self) -> Callable[[str], None]:
668668
def handler(line: AnyStr) -> None:
669669
return self._parse_progress_line(line.rstrip())
670670

671-
# END def handler
671+
# END handler
672672

673673
return handler
674674

test/test_submodule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def assert_exists(sm, value=True):
839839
assert sm.exists() == value
840840
assert sm.module_exists() == value
841841

842-
# END def assert_exists
842+
# END assert_exists
843843

844844
# As git is backwards compatible itself, it would still recognize what we do here... unless we really
845845
# muss it up. That's the only reason why the test is still here...

0 commit comments

Comments
 (0)