From 19257e2e4d4a9a400927457cc4c0c483e0737e63 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:00:21 +0000 Subject: [PATCH 1/3] :arrow_up: auto update by pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.2.0) - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] From 5d229e161a29836e2ba0147eabebb02586cec43d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:02:57 +0000 Subject: [PATCH 2/3] :rotating_light: auto fix by pre-commit hooks --- .devcontainer/devcontainer.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 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", + ], + }, + }, } From 0ac439718e71501dcf2f909c9cd4c3cb99830ff1 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:16:48 +0800 Subject: [PATCH 3/3] :wrench: update ruff config --- pyproject.example.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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