Some fixes

This commit is contained in:
Gavin John 2026-01-29 22:12:09 -08:00
parent 8d3292af3a
commit 146186522c
4 changed files with 6 additions and 5 deletions

View file

@ -80,5 +80,5 @@ async def eval_command(args: Namespace) -> None:
None,
None,
)
eval_repo(repo, repo_path)
await eval_repo(repo, repo_path)
print("OK")

View file

@ -5,7 +5,7 @@ import subprocess
import asyncio
import aiohttp
from pathlib import Path
from typing import Optional, Tuple
from typing import Optional, Tuple, List
from urllib.parse import urlparse, ParseResult
from .error import NurError, RepositoryDeletedError
@ -30,7 +30,7 @@ async def nix_prefetch_zip(url: str) -> Tuple[str, Path]:
return sha256, Path(path)
def parse_pkt_lines(data: bytes):
def parse_pkt_lines(data: bytes) -> List[bytes]:
i = 0
lines = []
while i < len(data):

View file

@ -1,5 +1,6 @@
import logging
import asyncio
from typing import List
from argparse import Namespace
from concurrent.futures import ThreadPoolExecutor, as_completed
@ -20,7 +21,7 @@ async def update(repo: Repo) -> Repo:
return repo
sha256, repo_path = await prefetcher.prefetch(latest_commit)
eval_repo(repo, repo_path)
await eval_repo(repo, repo_path)
repo.locked_version = LockedVersion(repo.url, latest_commit, sha256, repo.submodules)
return repo

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -p bash -i bash -p mypy -p black -p ruff -p nix
#!nix-shell -p bash -i bash -p mypy -p black -p ruff -p nix -p python3Packages.aiohttp
set -eux -o pipefail # Exit with nonzero exit code if anything fails