Add pre-commit hook with ruff formatting and ty type checking#10
Merged
Add pre-commit hook with ruff formatting and ty type checking#10
Conversation
Install ty as a dev dependency alongside ruff. Add a tracked pre-commit hook in .githooks/ that runs ruff format, ruff check with auto-fixes, and ty type checking on src/. Pre-existing type errors are downgraded to warnings in pyproject.toml for gradual adoption. Ruff formatting fixes are included. https://claude.ai/code/session_019cxQi1fNvGSm6CeCma7PY3
Replace the custom .githooks/ pre-commit hook with the standard pre-commit framework (https://pre-commit.com). Configure ruff-check, ruff-format, and ty as hooks in .pre-commit-config.yaml. Fix all ty type errors in src/: - Add Optional[] to parameters defaulting to None - Fix _rows type in JsonNormalizerContext to list[dict[str, JsonValue]] - Widen ExecutorOptions.column_names to Any to match actual usage - Change EMPTY from tuple() to typed list for JsonArray compatibility - Fix _extract return type to Dict[str, JsonArray] - Add assert narrowing for Optional fields set in __post_init__ - Fix walrus operator variable shadowing in cross_join https://claude.ai/code/session_019cxQi1fNvGSm6CeCma7PY3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Install ty as a dev dependency alongside ruff. Add a tracked
pre-commit hook in .githooks/ that runs ruff format, ruff check
with auto-fixes, and ty type checking on src/. Pre-existing type
errors are downgraded to warnings in pyproject.toml for gradual
adoption. Ruff formatting fixes are included.
https://claude.ai/code/session_019cxQi1fNvGSm6CeCma7PY3