this derivation will be built: /nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv building '/nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv' on 'ssh-ng://customer@mac02.m.ntd.one' building '/nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv' treefmt-check> treefmt v2.5.0traversed 163 files treefmt-check> emitted 93 files for processing treefmt-check> formatted 93 files (2 changed) in 1.826s treefmt-check> M packages/harvest-invoicer/src/harvest_invoicer/app.py treefmt-check> M packages/harvest-invoicer/tests/test_app.py treefmt-check> diff --git a/packages/harvest-invoicer/src/harvest_invoicer/app.py b/packages/harvest-invoicer/src/harvest_invoicer/app.py treefmt-check> index 0b06a85..93a52fe 100644 treefmt-check> --- a/packages/harvest-invoicer/src/harvest_invoicer/app.py treefmt-check> +++ b/packages/harvest-invoicer/src/harvest_invoicer/app.py treefmt-check> @@ -215,9 +215,7 @@ def create_app( treefmt-check> """Rebuild the invoice lines from the stored import + selection.""" treefmt-check> raw: list[InvoiceLine] = app.state["import_raw"] # type: ignore[attr-defined] treefmt-check> selected: set[str] = app.state["selected_people"] # type: ignore[attr-defined] treefmt-check> - lines = [ treefmt-check> - copy.deepcopy(ln) for ln in raw if not ln.user or ln.user in selected treefmt-check> - ] treefmt-check> + lines = [copy.deepcopy(ln) for ln in raw if not ln.user or ln.user in selected] treefmt-check> if app.state["import_merge"]: # type: ignore[attr-defined] treefmt-check> lines = merge_duplicate_lines(lines) treefmt-check> cur_client: dict[str, str] = app.state["client"] # type: ignore[attr-defined] treefmt-check> @@ -238,9 +236,7 @@ def create_app( treefmt-check> "selected": selected, treefmt-check> "you": str(issuer.get("harvest_user") or "").strip(), treefmt-check> "total_hours": round(sum(hours.values()), 2), treefmt-check> - "selected_hours": round( treefmt-check> - sum(h for n, h in roster if n in selected), 2 treefmt-check> - ), treefmt-check> + "selected_hours": round(sum(h for n, h in roster if n in selected), 2), treefmt-check> } treefmt-check> treefmt-check> def _import_note_oob() -> str: treefmt-check> diff --git a/packages/harvest-invoicer/tests/test_app.py b/packages/harvest-invoicer/tests/test_app.py treefmt-check> index 1a6f50b..970837b 100644 treefmt-check> --- a/packages/harvest-invoicer/tests/test_app.py treefmt-check> +++ b/packages/harvest-invoicer/tests/test_app.py treefmt-check> @@ -1006,7 +1006,7 @@ class TestStyleCss: treefmt-check> class TestImportRoster: treefmt-check> """Person chips: choose whose hours the invoice includes.""" treefmt-check> treefmt-check> - def _team_fetch(self, ps: date, pe: date) -> list[InvoiceLine]: # noqa: ARG002 treefmt-check> + def _team_fetch(self, ps: date, pe: date) -> list[InvoiceLine]: treefmt-check> return [ treefmt-check> InvoiceLine(concept="Dev", unit_price=100.0, quantity=10.0, user="Alice"), treefmt-check> InvoiceLine(concept="Ops", unit_price=90.0, quantity=5.0, user="Bob"), treefmt-check> @@ -1046,7 +1046,7 @@ class TestImportRoster: treefmt-check> assert resp.data.count(b'class="chip on') == 2 treefmt-check> treefmt-check> def test_single_person_import_has_no_chips(self, tmp_path: Path) -> None: treefmt-check> - def solo(ps: date, pe: date) -> list[InvoiceLine]: # noqa: ARG001 treefmt-check> + def solo(ps: date, pe: date) -> list[InvoiceLine]: treefmt-check> return [ treefmt-check> InvoiceLine(concept="Dev", unit_price=100.0, quantity=8.0, user="Al") treefmt-check> ] error: build of '/nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv' on 'ssh-ng://customer@mac02.m.ntd.one' failed: Cannot build '/nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/yr1p82vaq2sgpp3jb18h0p0px13g6dlv-treefmt-check Last 25 log lines: > } > > def _import_note_oob() -> str: > diff --git a/packages/harvest-invoicer/tests/test_app.py b/packages/harvest-invoicer/tests/test_app.py > index 1a6f50b..970837b 100644 > --- a/packages/harvest-invoicer/tests/test_app.py > +++ b/packages/harvest-invoicer/tests/test_app.py > @@ -1006,7 +1006,7 @@ class TestStyleCss: > class TestImportRoster: > """Person chips: choose whose hours the invoice includes.""" > > - def _team_fetch(self, ps: date, pe: date) -> list[InvoiceLine]: # noqa: ARG002 > + def _team_fetch(self, ps: date, pe: date) -> list[InvoiceLine]: > return [ > InvoiceLine(concept="Dev", unit_price=100.0, quantity=10.0, user="Alice"), > InvoiceLine(concept="Ops", unit_price=90.0, quantity=5.0, user="Bob"), > @@ -1046,7 +1046,7 @@ class TestImportRoster: > assert resp.data.count(b'class="chip on') == 2 > > def test_single_person_import_has_no_chips(self, tmp_path: Path) -> None: > - def solo(ps: date, pe: date) -> list[InvoiceLine]: # noqa: ARG001 > + def solo(ps: date, pe: date) -> list[InvoiceLine]: > return [ > InvoiceLine(concept="Dev", unit_price=100.0, quantity=8.0, user="Al") > ] For full logs, run: nix log /nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv error: Cannot build '/nix/store/bga80m5v77a7w0v582f90fxn3567vjsf-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/yr1p82vaq2sgpp3jb18h0p0px13g6dlv-treefmt-check