Skip to content

Commit b91224e

Browse files
committed
Simplify run_command return type
Changed the return type of run_command from CompletedProcess[str] to CompletedProcess. This was done to remove unnecessary type specificity and ensure compatibility with different Python versions. The update maintains functionality and improves code readability.
1 parent 500ecd3 commit b91224e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bumpversion/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def set_nested_value(d: dict, value: Any, path: str) -> None:
103103
current_element = current_element[key]
104104

105105

106-
def run_command(command: list, env: Optional[dict] = None) -> CompletedProcess[str]:
106+
def run_command(command: list, env: Optional[dict] = None) -> CompletedProcess:
107107
"""Run a shell command and return its output."""
108108
result = subprocess.run(command, text=True, check=True, capture_output=True, env=env) # NOQA: S603
109109
result.check_returncode()

0 commit comments

Comments
 (0)