Skip to content

Commit cbd7e18

Browse files
Fix new ruff complains.
* sphinx_polyversion/git.py: Call `subprocess.run` with `check=True`. * sphinx_polyversion/pyvenv.py (Poetry, Pip): Change return type of `__aenter__` to `Self`.
1 parent 1def4ce commit cbd7e18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sphinx_polyversion/git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_current_commit(repo: Path) -> str:
116116
"HEAD",
117117
)
118118

119-
process = subprocess.run(cmd, stdout=PIPE, cwd=repo)
119+
process = subprocess.run(cmd, stdout=PIPE, cwd=repo, check=True)
120120
return process.stdout.decode().rstrip("\n")
121121

122122

sphinx_polyversion/pyvenv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def __init__(self, path: Path, name: str, *, args: Iterable[str]):
233233
super().__init__(path, name, path / ".venv")
234234
self.args = args
235235

236-
async def __aenter__(self) -> Poetry:
236+
async def __aenter__(self) -> Self:
237237
"""
238238
Set the poetry venv up.
239239
@@ -344,7 +344,7 @@ def __init__(
344344
super().__init__(path, name, venv, creator=creator)
345345
self.args = args
346346

347-
async def __aenter__(self) -> Pip:
347+
async def __aenter__(self) -> Self:
348348
"""
349349
Set the venv up.
350350

0 commit comments

Comments
 (0)