Skip to content

Add pre-commit hook with ruff formatting and ty type checking#10

Merged
galpin merged 2 commits intomainfrom
claude/add-precommit-hook-ElJLM
Feb 22, 2026
Merged

Add pre-commit hook with ruff formatting and ty type checking#10
galpin merged 2 commits intomainfrom
claude/add-precommit-hook-ElJLM

Conversation

@galpin
Copy link
Owner

@galpin galpin commented Feb 22, 2026

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

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
@galpin galpin merged commit 00326b6 into main Feb 22, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants