Skip to content

Commit a99f651

Browse files
authored
noxfile mypy fixes (#12448)
1 parent 7f4c168 commit a99f651

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

noxfile.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ def tests(session: nox.Session) -> None:
5959
pathlib.Path(".") / ".rust-cov" / str(uuid.uuid4())
6060
).absolute()
6161
if session.name != "tests-nocoverage":
62+
rustflags = session.env.get("RUSTFLAGS", "")
63+
assert rustflags is not None
6264
session.env.update(
6365
{
64-
"RUSTFLAGS": "-Cinstrument-coverage "
65-
+ session.env.get("RUSTFLAGS", ""),
66+
"RUSTFLAGS": f"-Cinstrument-coverage {rustflags}",
6667
"LLVM_PROFILE_FILE": str(prof_location / "cov-%p.profraw"),
6768
}
6869
)
@@ -218,10 +219,11 @@ def rust(session: nox.Session) -> None:
218219
prof_location = (
219220
pathlib.Path(".") / ".rust-cov" / str(uuid.uuid4())
220221
).absolute()
222+
rustflags = session.env.get("RUSTFLAGS", "")
223+
assert rustflags is not None
221224
session.env.update(
222225
{
223-
"RUSTFLAGS": "-Cinstrument-coverage "
224-
+ session.env.get("RUSTFLAGS", ""),
226+
"RUSTFLAGS": f"-Cinstrument-coverage {rustflags}",
225227
"LLVM_PROFILE_FILE": str(prof_location / "cov-%p.profraw"),
226228
}
227229
)

0 commit comments

Comments
 (0)