From 77553a3de99861f57d5ec23fe6b549b691c294cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:21:49 +0800 Subject: [PATCH] :arrow_up: auto update by pre-commit hooks (#17) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> --- .devcontainer/devcontainer.json | 30 +++++++++++++++--------------- .pre-commit-config.yaml | 4 ++-- pyproject.example.toml | 13 +++++++------ 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 14db430..0166c86 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "name": "Default Linux Universal", "image": "mcr.microsoft.com/devcontainers/universal:2-linux", "features": { - "ghcr.io/devcontainers-contrib/features/poetry:1": {} + "ghcr.io/devcontainers-contrib/features/poetry:1": {}, }, "postCreateCommand": "poetry config virtualenvs.in-project true && poetry install && poetry run pre-commit install", "customizations": { @@ -15,31 +15,31 @@ "editor.defaultFormatter": "ms-python.black-formatter", "editor.codeActionsOnSave": { "source.fixAll.ruff": true, - "source.organizeImports": true - } + "source.organizeImports": true, + }, }, "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[html]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "[typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", }, "files.exclude": { - "**/__pycache__": true + "**/__pycache__": true, }, "files.watcherExclude": { "**/target/**": true, - "**/__pycache__": true - } + "**/__pycache__": true, + }, }, "extensions": [ "ms-python.python", @@ -47,8 +47,8 @@ "ms-python.isort", "ms-python.black-formatter", "EditorConfig.EditorConfig", - "esbenp.prettier-vscode" - ] - } - } + "esbenp.prettier-vscode", + ], + }, + }, } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3cc90e..d46c717 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ ci: autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks" repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.2.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -20,7 +20,7 @@ repos: stages: [commit] - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black stages: [commit] diff --git a/pyproject.example.toml b/pyproject.example.toml index 1571180..8500541 100644 --- a/pyproject.example.toml +++ b/pyproject.example.toml @@ -15,9 +15,9 @@ classifiers = [] python = "^3.8" [tool.poetry.group.dev.dependencies] -ruff = "^0.1.0" +ruff = "^0.2.0" isort = "^5.10.1" -black = "^23.1.0" +black = "^24.0.0" nonemoji = "^0.1.2" pre-commit = "^3.1.0" @@ -37,13 +37,14 @@ force_sort_within_sections = true extra_standard_library = ["typing_extensions"] [tool.ruff] -select = ["E", "W", "F", "UP", "C", "T", "PYI", "PT", "Q"] -ignore = ["C901"] - line-length = 88 target-version = "py38" -[tool.ruff.flake8-pytest-style] +[tool.ruff.lint] +select = ["E", "W", "F", "UP", "C", "T", "PYI", "PT", "Q"] +ignore = ["C901"] + +[tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false mark-parentheses = false