Fix linting errors from new `ruff` version.