Skip to content

Commit 8f9d4f4

Browse files
committed
KIT-4553 Introduce Ruff
1 parent 1e61a55 commit 8f9d4f4

File tree

16 files changed

+60
-112
lines changed

16 files changed

+60
-112
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
33

44
# Uninstall pre-installed formatting and linting tools
55
# They would conflict with our pinned versions
6-
RUN pipx uninstall flake8
6+
RUN pipx uninstall ruff
77
RUN pipx uninstall mypy

.devcontainer/devcontainer.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,16 @@
99
"settings": {
1010
"python.pythonPath": "/usr/local/bin/python",
1111
"python.defaultInterpreterPath": "/usr/local/bin/python",
12-
"python.languageServer": "Pylance",
13-
"flake8.path": [
14-
"/usr/local/py-utils/bin/bandit",
15-
"/usr/local/py-utils/bin/pydocstyle"
16-
],
17-
"flake8.importStrategy": "fromEnvironment"
12+
"python.languageServer": "Pylance"
1813
},
1914
"extensions": [
2015
"AykutSarac.jsoncrack-vscode",
16+
"charliermarsh.ruff",
2117
"eamodio.gitlens",
2218
"geeebe.duplicate",
2319
"Gruntfuggly.todo-tree",
2420
"matangover.mypy",
25-
"ms-python.black-formatter",
26-
"ms-python.flake8",
27-
"ms-python.isort",
28-
"ms-python.pylint",
2921
"ms-python.python",
30-
"ms-python.vscode-pylance",
3122
"ms-toolsai.jupyter",
3223
"njpwerner.autodocstring",
3324
"njqdev.vscode-python-typehint",
@@ -37,7 +28,8 @@
3728
"streetsidesoftware.code-spell-checker",
3829
"tamasfe.even-better-toml",
3930
"visualstudioexptteam.vscodeintellicode",
40-
"yzhang.markdown-all-in-one"
31+
"yzhang.markdown-all-in-one",
32+
"kaih2o.python-resource-monitor"
4133
]
4234
}
4335
},

.flake8

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/flake8-error-problem-matcher.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/flake8-warning-problem-matcher.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ jobs:
2323
python-version: "3.12"
2424
- name: Add linting matchers
2525
run: |
26-
echo "::add-matcher::.github/flake8-error-problem-matcher.json"
27-
echo "::add-matcher::.github/flake8-warning-problem-matcher.json"
2826
echo "::add-matcher::.github/mypy-error-problem-matcher.json"
29-
- name: Lint
30-
uses: py-actions/flake8@v2
3127
- name: Install dependencies
3228
run: |
3329
python -m pip install --upgrade pip
3430
pip install -r requirements-dev.txt
31+
- name: Create ruff failures dir
32+
run: mkdir -p ./ruff_failures
33+
- name: Lint with ruff
34+
run: |
35+
ruff check --output-format github . || echo "sag_py_auth" >> ./ruff_failures/ruff_failures.txt
3536
- name: Lint typing
3637
# Must run with installed dependencies
3738
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
.idea/sqlDataSources.xml
1414
.idea/dynamic.xml
1515
.idea/dictionaries
16+
.idea/ruff.xml
1617

1718
## File-based project format
1819
*.ipr

.idea/runConfigurations/Lint.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mypy.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exclude = (?x)(
66
venv/
77
| build/
88
| dist/
9+
| /site-packages/
910
)
1011
follow_imports = silent
1112
# Suppresses error messages about imports that cannot be resolved.

.pylintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)