Skip to content

Commit

Permalink
Update configuration (#83)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Privat33r-dev authored May 1, 2024
1 parent 5ad23c4 commit 5b63051
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurations": [
{
"name": "Clairvoyance on tests/apollo-server",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"module": "clairvoyance",
Expand All @@ -23,7 +23,7 @@
},
{
"name": "Clairvoyance on localhost:4000",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"module": "clairvoyance",
Expand All @@ -38,7 +38,7 @@
},
{
"name": "Clairvoyance on rick and morty GQL application",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"module": "clairvoyance",
Expand Down
84 changes: 42 additions & 42 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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,
}
}
"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,
}
}

0 comments on commit 5b63051

Please sign in to comment.