Skip to content

Commit 8b28509

Browse files
authored
Merge pull request #154 from a5chin/feature/ty
Add ty
2 parents f4ad664 + 15afc3e commit 8b28509

30 files changed

+292
-506
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"customizations": {
1313
"vscode": {
1414
"extensions": [
15+
"astral-sh.ty",
1516
"charliermarsh.ruff",
1617
"dorzey.vscode-sqlfluff",
1718
"exiasr.hadolint",

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ pytest-coverage.txt
186186
assets
187187
LICENSE
188188
noxfile.py
189-
pyrightconfig.json
190189
README.md
191190
ruff.toml
192191
tests
192+
ty.toml

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
documentation:
22
- changed-files:
3-
- any-glob-to-any-file: "docs/**"
3+
- any-glob-to-any-file: "**/*.md"
44

55
feature:
66
- head-branch: ["^feature/"]

.github/workflows/devcontainer.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
name: Devcontainer
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- ".devcontainer/docker-compose.yml"
8-
- ".devcontainer/Dockerfile"
9-
- ".github/workflows/devcontainer.yml"
10-
- ".python-version"
11-
124
pull_request:
13-
branches: [main]
145
paths:
156
- ".devcontainer/docker-compose.yml"
167
- ".devcontainer/Dockerfile"

.github/workflows/docker.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
name: Docker
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- ".github/workflows/docker.yml"
8-
- "**.py"
9-
- ".dockerignore"
10-
- ".python-version"
11-
- "pyproject.toml"
12-
- "uv.lock"
13-
144
pull_request:
15-
branches: [main]
165
paths:
176
- ".github/workflows/docker.yml"
187
- "**.py"

.github/workflows/format.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
name: Format
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- ".github/actions/setup-python-with-uv/action.yml"
8-
- ".github/workflows/format.yml"
9-
- "**.py"
10-
- "**.sql"
11-
- ".python-version"
12-
- ".sqlfluff"
13-
- "pyproject.toml"
14-
- "ruff.toml"
15-
- "uv.lock"
16-
174
pull_request:
18-
branches: [main]
195
paths:
206
- ".github/actions/setup-python-with-uv/action.yml"
217
- ".github/workflows/format.yml"

.github/workflows/gh-deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
- "uv.lock"
1515

1616
pull_request:
17-
branches: [main]
1817
paths:
1918
- ".github/actions/setup-git-config/action.yml"
2019
- ".github/actions/setup-python-with-uv/action.yml"

.github/workflows/lint.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
name: Lint
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- ".github/actions/setup-python-with-uv/action.yml"
8-
- ".github/workflows/lint.yml"
9-
- "**.py"
10-
- "**.sql"
11-
- ".python-version"
12-
- ".sqlfluff"
13-
- "pyproject.toml"
14-
- "pyrightconfig.json"
15-
- "ruff.toml"
16-
- "uv.lock"
17-
184
pull_request:
19-
branches: [main]
205
paths:
216
- ".github/actions/setup-python-with-uv/action.yml"
227
- ".github/workflows/lint.yml"
@@ -25,12 +10,12 @@ on:
2510
- ".python-version"
2611
- ".sqlfluff"
2712
- "pyproject.toml"
28-
- "pyrightconfig.json"
2913
- "ruff.toml"
14+
- "ty.toml"
3015
- "uv.lock"
3116

3217
jobs:
33-
pyright:
18+
ruff:
3419
runs-on: ubuntu-latest
3520

3621
steps:
@@ -40,10 +25,10 @@ jobs:
4025
- name: Setup Python with uv
4126
uses: ./.github/actions/setup-python-with-uv
4227

43-
- name: Lint by Pyright
44-
run: uv run nox -s lint -- --pyright
28+
- name: Lint by Ruff
29+
run: uv run nox -s lint -- --ruff
4530

46-
ruff:
31+
sqlfluff:
4732
runs-on: ubuntu-latest
4833

4934
steps:
@@ -53,10 +38,10 @@ jobs:
5338
- name: Setup Python with uv
5439
uses: ./.github/actions/setup-python-with-uv
5540

56-
- name: Lint by Ruff
57-
run: uv run nox -s lint -- --ruff
41+
- name: Lint by SQLFluff
42+
run: uv run nox -s lint -- --sqlfluff
5843

59-
sqlfluff:
44+
ty:
6045
runs-on: ubuntu-latest
6146

6247
steps:
@@ -66,5 +51,5 @@ jobs:
6651
- name: Setup Python with uv
6752
uses: ./.github/actions/setup-python-with-uv
6853

69-
- name: Lint by SQLFluff
70-
run: uv run nox -s lint -- --sqlfluff
54+
- name: Lint by ty
55+
run: uv run nox -s lint -- --ty

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
- "uv.lock"
1717

1818
pull_request:
19-
branches: [main]
2019
paths:
2120
- ".github/actions/setup-python-with-uv/action.yml"
2221
- ".github/workflows/test.yml"

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ repos:
4444
name: Ruff format
4545
description: "Run 'ruff format' for extremely fast Python formatting"
4646

47+
- repo: local
48+
hooks:
49+
- id: ty
50+
name: ty check
51+
entry: uv run ty check
52+
language: python
53+
types: [python]
54+
4755
- repo: https://github.com/hadolint/hadolint
4856
rev: v2.12.0
4957
hooks:

0 commit comments

Comments
 (0)