Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
hooks:
- id: poetry-check
- repo: https://github.com/facebook/pyrefly-pre-commit
rev: 0.53.0
rev: 1.1.1
hooks:
- id: pyrefly-check
name: Pyrefly (type checking)
Expand Down
65 changes: 34 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "squawk-alembic"
version = "0.3.3"
version = "0.3.4"
description = "Pre-commit hook to lint Alembic migration SQL with squawk"
packages = [{include = "squawk_alembic"}]
readme = "README.md"
Expand Down Expand Up @@ -32,8 +32,8 @@ squawk-cli = ">=2.0"
alembic = "~=1.18.4"
pre-commit = "~=4.6.0"
pytest = "~=9.0.3"
ruff = "~=0.15.14"
pyrefly = "~=1.0.0"
ruff = "~=0.13.3"
pyrefly = "~=1.1.1"
pytest-cov = "~=7.1.0"

[tool.poetry.scripts]
Expand All @@ -50,7 +50,7 @@ line-ending = "auto"
docstring-code-format = false

[tool.ruff.lint]
extend-select = ["I", "F"]
extend-select = ["I", "F", "UP", "B", "SIM", "C4"]

[tool.ruff.lint.isort]
known-first-party = ["squawk_alembic"]
Expand Down
2 changes: 1 addition & 1 deletion squawk_alembic/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.3"
__version__ = "0.3.4"
5 changes: 4 additions & 1 deletion squawk_alembic/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def _lint_file(filepath: str, migrations_path: Path, diff_branch: str | None) ->
print(error, file=sys.stderr)
return 1
except FileNotFoundError:
raise _SquawkNotFound
# Translate the low-level "squawk binary missing" OSError into our domain
# error; the original FileNotFoundError is an implementation detail, so
# suppress its chain with `from None`.
raise _SquawkNotFound from None
finally:
Path(tmp_path).unlink(missing_ok=True)

Expand Down
Loading