Skip to content

Instantly share code, notes, and snippets.

@DennyWeinberg
Last active September 1, 2023 09:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DennyWeinberg/0e14e75bbc26e7f496704ed3b750c573 to your computer and use it in GitHub Desktop.
Save DennyWeinberg/0e14e75bbc26e7f496704ed3b750c573 to your computer and use it in GitHub Desktop.
A VS Code settings file that contains what's needed to work properly with python. It configures tests and linting, so all imports are recognized and all problems are detected correctly, globally. Please install the python extensions pack in VS Code first.
{
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test_*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true,
"python.analysis.extraPaths": ["${workspaceFolder}/code/lambda/_shared_library/python/"],
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "strict",
"python.analysis.diagnosticSeverityOverrides": {
"reportUnusedImport": "warning",
"reportUnnecessaryTypeIgnoreComment": "information",
"reportUnusedVariable": "information",
"reportMissingTypeStubs": "none",
"reportUnknownParameterType": "none",
"reportMissingParameterType": "none",
"reportUnknownMemberType": "none",
"reportUnknownArgumentType": "none",
//"reportGeneralTypeIssues": "none", // Needed to detect wrong imports, but includes non needed checks
"reportUnknownVariableType": "none",
"reportOptionalSubscript": "none",
"reportPrivateUsage": "none"
},
"python.analysis.diagnosticMode": "workspace",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment