From f6c34201e03ff53b596e494d7679c3818d182962 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:41:20 +0000 Subject: [PATCH 1/2] MAINT: autoupdate pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/ComPWA/repo-maintenance: 0.0.192 → 0.0.201](https://github.com/ComPWA/repo-maintenance/compare/0.0.192...0.0.201) - [github.com/psf/black: 23.3.0 → 23.9.1](https://github.com/psf/black/compare/23.3.0...23.9.1) - [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.3) - [github.com/ComPWA/mirrors-pyright: v1.1.316 → v1.1.329](https://github.com/ComPWA/mirrors-pyright/compare/v1.1.316...v1.1.329) - [github.com/asottile/pyupgrade: v3.9.0 → v3.14.0](https://github.com/asottile/pyupgrade/compare/v3.9.0...v3.14.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.277 → v0.0.292](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.277...v0.0.292) - [github.com/ComPWA/mirrors-taplo: v0.8.0 → v0.8.1](https://github.com/ComPWA/mirrors-taplo/compare/v0.8.0...v0.8.1) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fd7d24..c3aa142 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.0.192 + rev: 0.0.201 hooks: - id: check-dev-files args: @@ -52,7 +52,7 @@ repos: - --fix - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black @@ -92,30 +92,30 @@ repos: metadata.vscode - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0 + rev: v3.0.3 hooks: - id: prettier - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.316 + rev: v1.1.329 hooks: - id: pyright - repo: https://github.com/asottile/pyupgrade - rev: v3.9.0 + rev: v3.14.0 hooks: - id: pyupgrade args: - --py37-plus - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.277 + rev: v0.0.292 hooks: - id: ruff args: - --fix - repo: https://github.com/ComPWA/mirrors-taplo - rev: v0.8.0 + rev: v0.8.1 hooks: - id: taplo From 9ba3e890fe971a938f6b941b7bad646ad35fa9ee Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:43:31 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/ISSUE_TEMPLATE/bug_report.md | 32 ----------------------- .github/ISSUE_TEMPLATE/feature_request.md | 22 ---------------- .github/pull_request_template.md | 11 -------- .pre-commit-config.yaml | 9 ++++--- .vscode/extensions.json | 2 ++ .vscode/settings.json | 9 +++---- pyproject.toml | 1 - 7 files changed, 11 insertions(+), 75 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d0cc61c..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "" -labels: Bug -assignees: "" ---- - -## Bug description - - - - - -## How to reproduce? - -Steps to reproduce the behavior: - -1. - -## Expected behavior - - - -## System info - -Bug resulted on the following system: - -- OS: -- Version -- Python version: -- Virtual environment: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 049eb32..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "" -labels: "✨ Enhancement" -assignees: "" ---- - -## Problem description - - - -## Proposed solution - - - - - - - diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 14b8085..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3aa142..d7d520d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,9 +41,6 @@ repos: - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.0 hooks: - - id: nbqa-black - additional_dependencies: - - black>=22.1.0 - id: nbqa-pyupgrade args: - --py37-plus @@ -55,6 +52,11 @@ repos: rev: 23.9.1 hooks: - id: black + - id: black-jupyter + args: + - --line-length=85 + types_or: + - jupyter - repo: https://github.com/editorconfig-checker/editorconfig-checker.python rev: 2.7.2 @@ -77,6 +79,7 @@ repos: cell.attachments cell.metadata.code_folding cell.metadata.id + cell.metadata.pycharm cell.metadata.user_expressions metadata.celltoolbar metadata.colab.name diff --git a/.vscode/extensions.json b/.vscode/extensions.json index be4c9f8..7c0eee2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -7,6 +7,7 @@ "garaioag.garaio-vscode-unwanted-recommendations", "github.vscode-github-actions", "github.vscode-pull-request-github", + "ms-python.black-formatter", "ms-python.python", "ms-python.vscode-pylance", "ms-vscode.live-server", @@ -20,6 +21,7 @@ ], "unwantedRecommendations": [ "bungcip.better-toml", + "davidanson.vscode-markdownlint", "ms-python.flake8", "ms-python.isort", "ms-python.mypy-type-checker", diff --git a/.vscode/settings.json b/.vscode/settings.json index 9740e18..7d4d47d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,11 +16,13 @@ "[python]": { "editor.codeActionsOnSave": { "source.organizeImports": true - } + }, + "editor.defaultFormatter": "ms-python.black-formatter" }, "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, + "black-formatter.importStrategy": "fromEnvironment", "cSpell.enabled": true, "editor.formatOnSave": true, "editor.rulers": [88], @@ -31,11 +33,6 @@ "github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"], "livePreview.defaultPreviewPath": "docs/_build/html", "python.analysis.autoImportCompletions": false, - "python.formatting.provider": "black", - "python.linting.enabled": true, - "python.linting.flake8Enabled": false, - "python.linting.pydocstyleEnabled": false, - "python.linting.pylintEnabled": false, "rewrap.wrappingColumn": 88, "ruff.enable": true, "ruff.organizeImports": true diff --git a/pyproject.toml b/pyproject.toml index 61b16ed..543f744 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ target-version = [ ] [tool.nbqa.addopts] -black = ["--line-length=85"] ruff = [ "--extend-ignore=B018", "--extend-ignore=C408",