Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyright matcher #481

Merged
merged 107 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
6df20ce
ci: introduce ruff
sujuka99 Sep 26, 2023
b94737f
ci: exclude snapshots
sujuka99 Sep 26, 2023
0833e1b
ci(ruff): ignore F401 in tests/*/__init__.py
sujuka99 Sep 26, 2023
a4c92a7
ci(ruff): fix order
sujuka99 Sep 26, 2023
c8bd70c
ci(ruff): comment out rules in nursery, remove comment
sujuka99 Sep 26, 2023
c7bb733
ci(ruff): Autofix "D"
sujuka99 Sep 26, 2023
6379c78
ci(ruff): improve comments
sujuka99 Sep 26, 2023
c70873c
ci(ruff-pydocstyle): improve rule selection
sujuka99 Sep 26, 2023
738e21b
ci(ruff): autofix "D"
sujuka99 Sep 26, 2023
11a54a5
chore: fix docstrings flagged by "D"
sujuka99 Sep 26, 2023
53ba27d
ci(ruff-pyupgrade): autofix
sujuka99 Sep 26, 2023
d090ff0
chore: manually fix code flagged by "UP"
sujuka99 Sep 26, 2023
feb6df3
chore: update snapshots
sujuka99 Sep 26, 2023
cc06875
ci(ruff): add rule ignores for "B"
sujuka99 Sep 26, 2023
687f37d
ci(ruff): configure "B"
sujuka99 Sep 26, 2023
1b6e29c
chore: manually fix code flagged by "B"
sujuka99 Sep 26, 2023
1621db1
chore: fix code flagged by "INP"
sujuka99 Sep 26, 2023
d0eefab
chore(ruff): fix code flagged by "BLE"
sujuka99 Sep 26, 2023
301284e
ci(ruff-commas): autofix
sujuka99 Sep 26, 2023
c7b3251
chore(ruff-comprehensions): ignore "C408"
sujuka99 Sep 26, 2023
0c2c7c1
ci(ruff-errmsg): autofix "EM"
sujuka99 Sep 26, 2023
0160c08
ci(ruff-pie): autofix
sujuka99 Sep 26, 2023
dd29e3a
ci(ruff-pie): exclude "PIE804"
sujuka99 Sep 26, 2023
49e9e4a
ci(ruff-pytest): autofix "PT"
sujuka99 Sep 26, 2023
b93c3d8
chore(ruff-pytest): manually fix code flagged by "PT"
sujuka99 Sep 26, 2023
9a8678a
ci(ruff-raise): autofix "RSE"
sujuka99 Sep 26, 2023
f90dd22
ci(ruff-return): autofix "RET"
sujuka99 Sep 26, 2023
68b824b
ci(ruff-simplify): autofix "SIM"
sujuka99 Sep 26, 2023
57fd749
ci(ruff-type-checking): disable "TCH" temporarily
sujuka99 Sep 26, 2023
57d9b50
ci(ruff): remove "ARG"
sujuka99 Sep 26, 2023
4e2dd33
ci(ruff-pathlib): autofix "PTH"
sujuka99 Sep 26, 2023
2d8129e
chore(ruff-pathlib): manually fix code flagged by "PTH"
sujuka99 Sep 26, 2023
07bf0f4
chore(ruff-pygrep): manually fix code flagged by "PGH"
sujuka99 Sep 26, 2023
8664342
ci(ruff-pylint): autofix "PL"
sujuka99 Sep 26, 2023
0d65ea8
ci(ruff): ignore "PLW2901"
sujuka99 Sep 26, 2023
54d4b4e
chore(ruff-pylint): manually fix code flagged by "PL"
sujuka99 Sep 26, 2023
8be0263
ci(ruff-tryceratops): autofix "TRY"
sujuka99 Sep 26, 2023
e73f9ab
chore(ruff-tryceratops): manually fix code flagged by "TRY"
sujuka99 Sep 26, 2023
794c60d
chore(pre-commit): pass pre-commit checks
sujuka99 Sep 26, 2023
d3d430d
Merge remote-tracking branch 'origin/main' into ci/introduce-ruff
sujuka99 Sep 26, 2023
14c3c99
chore: lint
sujuka99 Sep 26, 2023
c272a06
ci(ruff): enable "TCH" partly
sujuka99 Sep 26, 2023
750555f
ci(ruff): enable "TCH002"
sujuka99 Sep 26, 2023
502574b
ci(ruff): configure
sujuka99 Sep 26, 2023
31cd2be
chore: remove leftover file
sujuka99 Sep 26, 2023
9d4a761
ci: update workflow
sujuka99 Sep 26, 2023
25b0c08
chore: pass tests
sujuka99 Sep 26, 2023
0b9f26c
ci(ruff-type-checking): Add "TCH001" with proper config
sujuka99 Sep 27, 2023
bdee94d
style: one-liner
sujuka99 Sep 27, 2023
847d4e9
ci(ruff): Ignore COM812
sujuka99 Sep 27, 2023
5a6c3d1
Revert "ci(ruff-commas): autofix"
sujuka99 Sep 27, 2023
1e03e1a
test: whether matcher works
sujuka99 Sep 27, 2023
2fab625
test: problem checker
sujuka99 Sep 27, 2023
e3b7122
fix: ci
sujuka99 Sep 27, 2023
884445f
ci(ruff): format output as "text" in the CI only
sujuka99 Sep 27, 2023
0eb104d
fix(ruff): pre-commit wrong arg
sujuka99 Sep 27, 2023
47b3377
fix: ruff args in pre-commit
sujuka99 Sep 27, 2023
60a500b
fix(ci): ruff pre-commit hook
sujuka99 Sep 27, 2023
571c43f
ci: attempt to fix
sujuka99 Sep 27, 2023
3283ec0
fix: problem matcher regex
sujuka99 Sep 27, 2023
6622b59
fix: regex problem matchr
sujuka99 Sep 27, 2023
797aec7
ci: only lint once with ruff
sujuka99 Sep 27, 2023
fcfbcaf
chore: lint ci
sujuka99 Sep 27, 2023
049a3db
fix(ci): deduplicate pre-commit run
sujuka99 Sep 27, 2023
5229ff1
ci: always run ruff
sujuka99 Sep 27, 2023
ed8b99d
fix(ci): windows
sujuka99 Sep 27, 2023
4a82df1
chore: lint and format
sujuka99 Sep 27, 2023
966dd85
docs: add ruff badge
sujuka99 Sep 27, 2023
2712048
ci(ruff): configure isort
sujuka99 Sep 28, 2023
22409bf
chore(ruff): remove comment
sujuka99 Sep 28, 2023
b255ea3
tests: rewrite snapshots
sujuka99 Oct 2, 2023
2b6ac1b
ci: better access to python version
sujuka99 Oct 2, 2023
d1aeac5
ci: remove ruff-ci pre-commit hook
sujuka99 Oct 2, 2023
c56ef96
ci: remove repeating repo definitions pre-commit
sujuka99 Oct 2, 2023
a2c5a7f
chore: typing
sujuka99 Oct 2, 2023
e673acc
ci: replace black with ruff
sujuka99 Oct 2, 2023
83d9b46
ci: remove black
sujuka99 Oct 2, 2023
1d7a04b
ci: update ruff
sujuka99 Oct 2, 2023
51ce484
Merge remote-tracking branch 'origin/ci/introduce-ruff' into ci/repla…
sujuka99 Oct 3, 2023
8190be7
ci: format with ruff
sujuka99 Oct 3, 2023
6cfb87d
ci: enable some pyright rules
sujuka99 Oct 3, 2023
9794010
ci: pyright matcher WIP
sujuka99 Oct 3, 2023
d01a4c7
Merge remote-tracking branch 'origin/main' into ci/configure-pyright
sujuka99 Oct 23, 2023
1326944
chore: update ci
sujuka99 Oct 23, 2023
8e8c39e
fix: problem matcher WIP
sujuka99 Oct 23, 2023
04e7817
Merge remote-tracking branch 'origin/main' into ci/configure-pyright
sujuka99 Nov 13, 2023
87459f0
Merge remote-tracking branch 'origin/main' into ci/configure-pyright
sujuka99 Apr 3, 2024
5b6bcc3
Fix pyproject
sujuka99 Apr 3, 2024
f7ba0a7
test matcher
sujuka99 Apr 3, 2024
aa75eb6
Enable ruff matcher in CI
sujuka99 Apr 3, 2024
1ee093c
test
sujuka99 Apr 3, 2024
81b8cfd
Fix pyright matcher
sujuka99 Apr 3, 2024
d01198e
Introduce error for test purposes
sujuka99 Apr 3, 2024
6ffeeb5
Remove unneeded changes
sujuka99 Apr 3, 2024
4aa716b
Make matcher loop
sujuka99 Apr 3, 2024
f5a32a7
Improve matcher regex
disrupted Apr 3, 2024
24751e9
Remove Ruff error
disrupted Apr 3, 2024
1cbac2d
Format
disrupted Apr 3, 2024
f66134a
Remove first pattern
disrupted Apr 3, 2024
75bb6d4
Remove loop
disrupted Apr 3, 2024
6f2ca91
Fix matching of filename
disrupted Apr 3, 2024
9710fa7
Set cutoff for matching to Pyright summary
disrupted Apr 3, 2024
d86e4bf
Remove unneeded changes
sujuka99 Apr 4, 2024
0513161
Merge remote-tracking branch 'origin/main' into ci/configure-pyright
sujuka99 Apr 4, 2024
5d9d345
Fix CI
sujuka99 Apr 4, 2024
3179a62
Merge remote-tracking branch 'origin/main' into ci/configure-pyright
sujuka99 Apr 12, 2024
44cbfa2
Set default shell in CI
sujuka99 Apr 12, 2024
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
17 changes: 17 additions & 0 deletions .github/pyright-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "pyright",
"pattern": [
{
"regexp": "^\\s\\s(\\S*\\.py):(\\d+):(\\d+)\\s-\\s(error|warning|information):([\\s\\S]+?)(?=(?:^\\s\\s\\S*\\.py:\\d+:\\d+\\s-\\s(?:error|warning|information):|\\z|\\d+ errors,))",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
14 changes: 12 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- main
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test:
name: Test
Expand Down Expand Up @@ -38,7 +42,6 @@ jobs:
run: poetry install --no-interaction

- name: Lint (ruff)
shell: bash
run: |
if [[ "$RUNNER_OS" == "Linux" && "${{ matrix.python-version }}" == "3.10" ]]
then
Expand All @@ -52,7 +55,14 @@ jobs:
run: poetry run pre-commit run ruff-format --all-files --show-diff-on-failure

- name: Typing (pyright)
run: poetry run pre-commit run pyright --all-files
run: |
if [[ "$RUNNER_OS" == "Linux" && "${{ matrix.python-version }}" == "3.10" ]]
then
echo "::add-matcher::.github/pyright-matcher.json"
poetry run pre-commit run pyright --all-files
else
poetry run pre-commit run pyright --all-files
fi;

- name: Generate schema (kpops schema)
run: poetry run pre-commit run gen-schema --all-files --show-diff-on-failure
Expand Down
10 changes: 10 additions & 0 deletions poetry.lock

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

Loading