* add pyupgrade hook * run pyupgrade (pre-commit run -a) * ruff --fix * Revert "add pyupgrade hook" This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066. * revert changes to third_party/ * manual type fixes * explicit Optional wrapping capnp objects old-commit-hash: 995250ae4967943ee33a3699a1d89a7a770d95e9