Skip to content

Commit c6dab19

Browse files
committed
Allow explicit casting even when slightly redundant
1 parent 76394d4 commit c6dab19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

git/cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def pump_stream(
154154
p_stdout = process.proc.stdout if process.proc else None
155155
p_stderr = process.proc.stderr if process.proc else None
156156
else:
157-
process = cast(Popen, process)
157+
process = cast(Popen, process) # type: ignore [redundant-cast]
158158
cmdline = getattr(process, "args", "")
159159
p_stdout = process.stdout
160160
p_stderr = process.stderr

git/objects/commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def _iter_from_process_or_stream(cls, repo: "Repo", proc_or_stream: Union[Popen,
460460
if proc_or_stream.stdout is not None:
461461
stream = proc_or_stream.stdout
462462
elif hasattr(proc_or_stream, "readline"):
463-
proc_or_stream = cast(IO, proc_or_stream)
463+
proc_or_stream = cast(IO, proc_or_stream) # type: ignore [redundant-cast]
464464
stream = proc_or_stream
465465

466466
readline = stream.readline

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