From 5b63051e2a249f04be06dcb70863fedaddc781d0 Mon Sep 17 00:00:00 2001 From: Kerim Kabirov Date: Wed, 1 May 2024 10:51:51 +0200 Subject: [PATCH] Update configuration (#83) * Update vscode configuration: replace python with debugpy The `python` is considered deprecated, * Bump mypy version Since PIP supports minimum version 3.8 * Remove 'print-statement' option from pylint --- .mypy.ini | 2 +- .pylintrc | 1 - .vscode/launch.json | 6 ++-- .vscode/settings.json | 84 +++++++++++++++++++++---------------------- 4 files changed, 46 insertions(+), 47 deletions(-) diff --git a/.mypy.ini b/.mypy.ini index acf877b..0b058af 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.7 +python_version = 3.8 disallow_untyped_defs=True disallow_untyped_calls=True disallow_incomplete_defs=True diff --git a/.pylintrc b/.pylintrc index 9c5f4b4..957020d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -53,5 +53,4 @@ ignore-imports=yes #TODO: DEV - Fix these one day: broad-except, fixme disable=logging-format-interpolation, logging-fstring-interpolation, broad-except, fixme, missing-class-docstring, missing-module-docstring, missing-function-docstring -enable=print-statement extension-pkg-whitelist=lxml \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 20c5051..829cb09 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "configurations": [ { "name": "Clairvoyance on tests/apollo-server", - "type": "python", + "type": "debugpy", "request": "launch", "cwd": "${workspaceFolder}", "module": "clairvoyance", @@ -23,7 +23,7 @@ }, { "name": "Clairvoyance on localhost:4000", - "type": "python", + "type": "debugpy", "request": "launch", "cwd": "${workspaceFolder}", "module": "clairvoyance", @@ -38,7 +38,7 @@ }, { "name": "Clairvoyance on rick and morty GQL application", - "type": "python", + "type": "debugpy", "request": "launch", "cwd": "${workspaceFolder}", "module": "clairvoyance", diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f5a51f..08967c9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,43 +1,43 @@ { - "python.languageServer": "Pylance", - "python.linting.pylintEnabled": false, - "python.linting.enabled": false, - "python.linting.pylintPath": "./.venv/bin/pylint", - "python.formatting.provider": "yapf", - "editor.formatOnSave": true, - "python.defaultInterpreterPath": "./.venv/bin/python", - "mypy.runUsingActiveInterpreter": true, - "emeraldwalk.runonsave": { - "commands": [ - { - "match": "\\.py$", - "cmd": "cd ${workspaceFolder} && poetry run isort -m 9 --line-length 160 clairvoyance tests scripts" - }, - { - "match": "\\.py$", - "cmd": "cd ${workspaceFolder} && poetry run autoflake --in-place --remove-unused-variables --remove-all-unused-imports clairvoyance/**/*.py" - }, - { - "match": "\\.py$", - "cmd": "cd ${workspaceFolder} && poetry run docformatter --wrap-summaries 160 --wrap-descriptions 160 -ri clairvoyance tests scripts" - }, - { - "match": "\\.py$", - "cmd": "cd ${workspaceFolder} && poetry run unify -ri clairvoyance tests scripts" - } - ] - }, - "python.testing.pytestArgs": [ - "--cov=clairvoyance tests scripts" - ], - "python.testing.pytestEnabled": true, - "python.testing.pytestPath": "../scripts/pytest-with-cov", - "python.linting.ignorePatterns": [ - "**/site-packages/**/*.py", - ".vscode/*.py", - ".venv/**" - ], - "files.exclude": { - "**/__pycache__": true, - } - } \ No newline at end of file + "python.languageServer": "Pylance", + "python.linting.pylintEnabled": false, + "python.linting.enabled": false, + "python.linting.pylintPath": "./.venv/bin/pylint", + "python.formatting.provider": "yapf", + "editor.formatOnSave": true, + "python.defaultInterpreterPath": "./.venv/bin/python", + "mypy.runUsingActiveInterpreter": true, + "emeraldwalk.runonsave": { + "commands": [ + { + "match": "\\.py$", + "cmd": "cd ${workspaceFolder} && poetry run isort -m 9 --line-length 160 clairvoyance tests scripts" + }, + { + "match": "\\.py$", + "cmd": "cd ${workspaceFolder} && poetry run autoflake --in-place --remove-unused-variables --remove-all-unused-imports clairvoyance/**/*.py" + }, + { + "match": "\\.py$", + "cmd": "cd ${workspaceFolder} && poetry run docformatter --wrap-summaries 160 --wrap-descriptions 160 -ri clairvoyance tests scripts" + }, + { + "match": "\\.py$", + "cmd": "cd ${workspaceFolder} && poetry run unify -ri clairvoyance tests scripts" + } + ] + }, + "python.testing.pytestArgs": [ + "--cov=clairvoyance tests scripts" + ], + "python.testing.pytestEnabled": true, + "python.testing.pytestPath": "../scripts/pytest-with-cov", + "python.linting.ignorePatterns": [ + "**/site-packages/**/*.py", + ".vscode/*.py", + ".venv/**" + ], + "files.exclude": { + "**/__pycache__": true, + } +} \ No newline at end of file