From 1cec12c85cc594f19957288eea5c55f89333870d Mon Sep 17 00:00:00 2001 From: DeadNews Date: Sun, 7 Jan 2024 19:32:48 +0700 Subject: [PATCH] chore(vscode): update settings chore(makefile): update --- .vscode/extensions.json | 7 +++++-- .vscode/settings.json | 7 ++----- Makefile | 21 ++++++++++++--------- pyproject.toml | 12 +++++++++--- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index f7d1b9c..20ccbd0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,7 @@ { - // List of extensions which should be recommended for users of this workspace. - "recommendations": ["ms-python.python", "charliermarsh.ruff"] + "recommendations": [ + "charliermarsh.ruff", + "ms-python.mypy-type-checker", + "ms-python.python" + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index d14bc0d..c516cf5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,12 +4,9 @@ "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.organizeImports": true + "source.fixAll": "explicit", + "source.organizeImports": "explicit" } }, - // mypy - "python.linting.mypyEnabled": true, - // pytest "python.testing.pytestEnabled": true } diff --git a/Makefile b/Makefile index 4037853..f4bd752 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,23 @@ -poetry-install: - poetry install --sync +.PHONY: test -poetry-up: - poetry up --latest +install-all: install pc-install + +install: + poetry install --sync -pre-commit-install: +pc-install: pre-commit install -pre-commit-up: - pre-commit autoupdate +update-latest: + poetry up --latest + +checks: pc-run lint -pre-commit-run: +pc-run: pre-commit run -a lint: poetry run poe lint -tests: +test: poetry run pytest diff --git a/pyproject.toml b/pyproject.toml index f866282..9be2a81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ exclude_lines = [ [tool.mypy] disallow_untyped_defs = true -follow_imports = "silent" +follow_imports = "normal" ignore_missing_imports = true show_column_numbers = true show_error_codes = true @@ -72,11 +72,11 @@ warn_unused_ignores = true [[tool.mypy.overrides]] module = ["tests.*"] -allow_untyped_defs = true +disallow_untyped_defs = false [tool.ruff] line-length = 99 -target-version = "py311" # until poetry v2 +target-version = "py311" # Until Poetry v2 [tool.ruff.format] line-ending = "lf" @@ -110,5 +110,11 @@ allow-dict-calls-with-keyword-arguments = false [tool.ruff.flake8-tidy-imports] ban-relative-imports = "all" +[tool.ruff.pydocstyle] +convention = "google" + +[tool.ruff.pycodestyle] +max-doc-length = 129 + [tool.ruff.flake8-annotations] allow-star-arg-any = true