Skip to content

Commit

Permalink
augh
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Nov 21, 2023
1 parent 5bf16e7 commit 8c8dc6b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import io
import shutil
from pathlib import Path
from typing import Mapping
Expand Down Expand Up @@ -40,7 +39,7 @@ def tests(session: nox.Session):
def pdoc(session: nox.Session):
session.install(".[pdoc]")

version = run_silent(session, "hatch", "version")
version = run_silent(session, "hatch", "--quiet", "version")
commit = run_silent_external(session, "git", "rev-parse", "--short", "HEAD")

session.run(
Expand Down Expand Up @@ -69,7 +68,7 @@ def tag(session: nox.Session):
message = "Automatic PEP 440 release tag"

# validate some assumptions to make this simpler
version = Version(run_silent(session, "hatch", "version"))
version = Version(run_silent(session, "hatch", "--quiet", "version"))
assert version.epoch != 0
assert len(version.release) == 3

Expand Down Expand Up @@ -152,14 +151,12 @@ def run_silent(
env: Mapping[str, str] | None = None,
external: bool = False,
):
with io.StringIO() as f:
session.run(
*args,
env=env,
external=external,
stdout=f,
)
output = f.getvalue()
output: str | None = session.run(
*args,
env=env,
silent=True,
external=external,
)
assert output
return output.strip()

Expand Down

0 comments on commit 8c8dc6b

Please sign in to comment.