Skip to content

Commit f7e73d6

Browse files
fix: migrate pyrefly hook and apply ruff formatting
1 parent 357179a commit f7e73d6

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
- repo: https://github.com/facebook/pyrefly-pre-commit
3333
rev: 0.53.0
3434
hooks:
35-
- id: pyrefly-typecheck-system
35+
- id: pyrefly-check
3636
name: Pyrefly (type checking)
3737
pass_filenames: false
38-
always_run: true
38+
language: system

squawk_alembic/hook.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ def extract_revision_info(filepath):
6464

6565
name = node.targets[0].id
6666
if name == "revision":
67-
if isinstance(node.value, Constant) and isinstance(
68-
node.value.value, str
69-
):
67+
if isinstance(node.value, Constant) and isinstance(node.value.value, str):
7068
revision = node.value.value
7169
elif name == "down_revision":
7270
if isinstance(node.value, Constant):

tests/test_squawk_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55

66
from pytest import fixture, mark
77

8-
pytestmark = mark.skipif(
9-
shutil.which("squawk") is None, reason="squawk not installed"
10-
)
8+
pytestmark = mark.skipif(shutil.which("squawk") is None, reason="squawk not installed")
119

1210

1311
SQL = "ALTER TABLE foo ADD COLUMN bar text;\n"

0 commit comments

Comments
 (0)