treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> darwinModules/app-store/declarative-app-store.py:1:1 CPY001 Missing copyright notice at top of file --> home-manager/modules/calendar-notify.py:1:1 CPY001 Missing copyright notice at top of file --> home-manager/modules/herdr/registry.py:1:1 CPY001 Missing copyright notice at top of file --> home-manager/modules/neovim/nvim_open.py:1:1 CPY001 Missing copyright notice at top of file --> home/.config/todoman/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> home/.config/todoman/config.py:1:1 CPY001 Missing copyright notice at top of file --> home/.gemini/hooks/bell-notify.py:1:1 CPY001 Missing copyright notice at top of file --> home/.weechat/python/herdr_notify.py:1:1 PLR0917 Too many positional arguments (8 > 5) --> home/.weechat/python/herdr_notify.py:59:5 | 59 | def message_cb( | ^^^^^^^^^^ 60 | data: str, 61 | buffer: str, | CPY001 Missing copyright notice at top of file --> machines/eva/modules/telegraf/http-sd-generate.py:1:1 CPY001 Missing copyright notice at top of file --> machines/eve/modules/paperless-perms/paperless_perms/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> machines/eve/modules/paperless-perms/paperless_perms/apps.py:1:1 CPY001 Missing copyright notice at top of file --> machines/eve/pkgs/sieve-flagged-forward/notify-flagged.py:1:1 CPY001 Missing copyright notice at top of file --> machines/eve/pkgs/sieve-flagged-forward/test_notify_flagged.py:1:1 CPY001 Missing copyright notice at top of file --> machines/turingmachine/modules/networkmanager/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> nixosModules/kde/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> nixosModules/kde/audio_chooser.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/cewe-fotowelt/update.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/crabfit-cli/crabfit_cli.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/gh-radicle/gh_radicle.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/kdeconnect/update.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/librewolf-macos/update.py:1:1 SIM115 Use a context manager for opening files --> pkgs/live-text/live_text/main.py:30:11 | 28 | def _tmp_png(stack: contextlib.ExitStack) -> Path: 29 | """Create a temporary PNG file that is deleted when the stack exits.""" 30 | tmp = tempfile.NamedTemporaryFile(suffix=".png", prefix="live-text-", delete=False) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 31 | tmp.close() 32 | path = Path(tmp.name) | SIM115 Use a context manager for opening files --> pkgs/live-text/live_text/overlay.py:1555:15 | 1553 | return 1554 | 1555 | tmp = tempfile.NamedTemporaryFile( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1556 | suffix=".png", prefix="annotated-", delete=False 1557 | ) | DTZ005 `datetime.datetime.now()` called without a `tz` argument --> pkgs/live-text/live_text/overlay.py:1588:21 | 1586 | save_dir = Path.home() / "Pictures" / "Screenshots" 1587 | save_dir.mkdir(parents=True, exist_ok=True) 1588 | timestamp = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") | ^^^^^^^^^^^^^^ 1589 | save_path = save_dir / f"screenshot-{timestamp}.png" 1590 | out.write_to_png(str(save_path)) | help: Pass a `datetime.timezone` object to the `tz` parameter SIM115 Use a context manager for opening files --> pkgs/live-text/live_text/screenshot.py:145:11 | 143 | The caller is responsible for cleaning up the file. 144 | """ 145 | tmp = tempfile.NamedTemporaryFile(suffix=".png", prefix="live-text-", delete=False) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 146 | tmp.close() 147 | path = Path(tmp.name) | SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements --> pkgs/live-text/tests/test_overlay.py:86:9 | 84 | return subprocess.CompletedProcess(cmd, 0) 85 | 86 | / with patch("live_text.overlay.subprocess.run", side_effect=fake_run): 87 | | # Suppress GLib.timeout_add (no GTK main loop in tests) 88 | | with patch("live_text.overlay.GLib.timeout_add"): | |_____________________________________________________________^ 89 | overlay._drawing_area = MagicMock() 90 | overlay._copy_selected_text() | help: Combine `with` statements SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements --> pkgs/live-text/tests/test_screenshot.py:259:9 | 257 | raise subprocess.CalledProcessError(1, "grim") 258 | 259 | / with patch("live_text.screenshot.subprocess.run", side_effect=track_and_fail): 260 | | with pytest.raises(subprocess.CalledProcessError): | |______________________________________________________________^ 261 | capture_full_screen() | help: Combine `with` statements CPY001 Missing copyright notice at top of file --> pkgs/macprof/macprof.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/build.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/cli.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/db.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/diff.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/eval.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/src/minihydra/web.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/tests/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/tests/test_diff.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/minihydra/tests/test_web.py:1:1 RUF012 Mutable default value for class attribute --> pkgs/n8n-hooks/tests/test_gitea.py:147:28 | 146 | class _FakeWebhook(BaseHTTPRequestHandler): 147 | last: dict[str, Any] = {} | ^^ 148 | reply: dict[str, Any] = {} | help: Consider initializing in `__init__` or annotating with `typing.ClassVar` RUF012 Mutable default value for class attribute --> pkgs/n8n-hooks/tests/test_gitea.py:148:29 | 146 | class _FakeWebhook(BaseHTTPRequestHandler): 147 | last: dict[str, Any] = {} 148 | reply: dict[str, Any] = {} | ^^ 149 | 150 | def do_POST(self) -> None: | help: Consider initializing in `__init__` or annotating with `typing.ClassVar` RUF012 Mutable default value for class attribute --> pkgs/n8n-hooks/tests/test_github.py:45:28 | 44 | class _FakeWebhook(BaseHTTPRequestHandler): 45 | last: dict[str, Any] = {} | ^^ 46 | reply: dict[str, Any] = {} | help: Consider initializing in `__init__` or annotating with `typing.ClassVar` RUF012 Mutable default value for class attribute --> pkgs/n8n-hooks/tests/test_github.py:46:29 | 44 | class _FakeWebhook(BaseHTTPRequestHandler): 45 | last: dict[str, Any] = {} 46 | reply: dict[str, Any] = {} | ^^ 47 | 48 | def do_POST(self) -> None: | help: Consider initializing in `__init__` or annotating with `typing.ClassVar` RUF012 Mutable default value for class attribute --> pkgs/n8n-hooks/tests/test_store_draft.py:71:36 | 69 | """Captures the last POST body and replies 200.""" 70 | 71 | last_payload: dict[str, Any] = {} | ^^ 72 | 73 | def do_POST(self) -> None: | help: Consider initializing in `__init__` or annotating with `typing.ClassVar` CPY001 Missing copyright notice at top of file --> pkgs/nix-eval-warnings/src/nix_eval_warnings/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/nix-eval-warnings/tests/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/nix-eval-warnings/tests/test_nix_eval_warnings.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/pim/pim.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/radicle-desktop/update.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/radicle-github-sync/radicle_github_sync.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/updater/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/updater/__main__.py:1:1 CPY001 Missing copyright notice at top of file --> tasks.py:1:1 Found 53 errors. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> nixosModules/niri/kwallet-tpm/kwallet-tpm-unlock.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> openwrt/nix_uci/__init__.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> pkgs/claude-md/claude_md.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> machines/eva/modules/prometheus/irc-alerts.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> pkgs/systemctl/systemctl.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> pkgs/merge-when-green/merge-when-green.py:1:1 Found 1 error. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> pkgs/rbw_pinentry/src/rbw_pinentry/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/rbw_pinentry/src/rbw_pinentry/cli.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/rbw_pinentry/src/rbw_pinentry/pinentry.py:1:1 Found 3 errors. ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1 CPY001 Missing copyright notice at top of file --> pkgs/calendar_bot/__init__.py:1:1 CPY001 Missing copyright notice at top of file --> pkgs/calendar_bot/calendar_bot.py:1:1 Found 2 errors. traversed 1211 files emitted 527 files for processing formatted 450 files (2 changed) in 8.583s Error: failed to finalise formatting: formatting failures detected