Skip to content

Commit

Permalink
Merge pull request #3 from RyushiAok:chore/ruff
Browse files Browse the repository at this point in the history
Ruffを導入
  • Loading branch information
RyushiAok authored Oct 25, 2023
2 parents 40e052a + 8438415 commit ae963b5
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 388 deletions.
25 changes: 6 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,10 @@ repos:
- id: check-json
- id: detect-private-key

- repo: https://github.com/psf/black
rev: 23.7.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.2
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--max-line-length=80]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
24 changes: 6 additions & 18 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
{
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python",
"python.formatting.provider": "black",
"python.formatting.blackPath": "${workspaceFolder}/.venv/Scripts/black",
"isort.path": ["${workspaceFolder}/.venv/Scripts/isort"],
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--max-line-length",
"80",
"--ignore=E203, W503",
"--max-complexity=10"
],
"python.linting.flake8Path": "${workspaceFolder}/.venv/Scripts/flake8",
"python.linting.mypyEnabled": true,
"python.linting.mypyPath": "${workspaceFolder}/.venv/Scripts/mypy"
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll.ruff": true,
"source.organizeImports.ruff": true
}
}
}
Loading

0 comments on commit ae963b5

Please sign in to comment.