Skip to content

Commit

Permalink
Merge pull request #683 from SUNET/ylle_evaluating_ruff
Browse files Browse the repository at this point in the history
Evaluating ruff
  • Loading branch information
johanlundberg authored Sep 11, 2024
2 parents 4db0ee3 + 69abb0b commit 8540f9a
Show file tree
Hide file tree
Showing 155 changed files with 393 additions and 758 deletions.
8 changes: 2 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"cSpell.language": "en-GB,en,sv"
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
"tabbyml.vscode-tabby",
"GitHub.vscode-pull-request-github",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-swedish",
"ms-vscode.makefile-tools",
"ms-python.isort"
"charliermarsh.ruff"
]
}
},
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,19 @@ jobs:
mypy --version
make typecheck
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
# Update output format to enable automatic inline annotations.
- name: Run Ruff
run: ruff check --output-format=github .

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"ms-python.isort"
]
}
8 changes: 3 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"black-formatter.args": [
"--line-length 120"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff"
},
"terminal.integrated.env.linux": {
"PYTHONPATH": "${workspaceFolder}/src"
},
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ test:
PYTHONPATH=$(SRCDIR) pytest -vvv -ra --log-cli-level DEBUG

reformat:
isort --line-width 120 --atomic --project eduid $(SOURCE)
black --line-length 120 --target-version py310 $(SOURCE)
# sort imports and remove unused imports
ruff check --select F401,I --fix
# reformat
ruff format

lint:
ruff check

typecheck:
MYPYPATH=$(SRCDIR) mypy $(MYPY_ARGS) --namespace-packages -p eduid
Expand Down
13 changes: 0 additions & 13 deletions import/eduid_msg/.coveragerc

This file was deleted.

68 changes: 0 additions & 68 deletions import/eduid_msg/.github/workflows/codeql-analysis.yml

This file was deleted.

55 changes: 0 additions & 55 deletions import/eduid_msg/.github/workflows/run-tests.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions import/eduid_msg/.gitignore

This file was deleted.

39 changes: 0 additions & 39 deletions import/eduid_msg/.jenkins.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions import/eduid_msg/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions import/eduid_msg/LICENSE.txt

This file was deleted.

22 changes: 0 additions & 22 deletions import/eduid_msg/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion import/eduid_msg/README.rst

This file was deleted.

18 changes: 0 additions & 18 deletions import/eduid_msg/docker/build.sh

This file was deleted.

13 changes: 0 additions & 13 deletions import/eduid_msg/docker/setup.sh

This file was deleted.

Loading

0 comments on commit 8540f9a

Please sign in to comment.