mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[Easy][BE] update recommanded VS Code settings (#152760)
Changes: - Remove old invalid settings and replace with new settings. - Add commonly used VS Code extensions to support `cmake`, `ruff`, `mypy`, `flake8`, `editorconfig`, and spell checker. Also, add corresponding settings. Pull Request resolved: https://github.com/pytorch/pytorch/pull/152760 Approved by: https://github.com/drisspg
This commit is contained in:
committed by
PyTorch MergeBot
parent
1393f71e07
commit
e7da21806f
12
.vscode/extensions.json
vendored
12
.vscode/extensions.json
vendored
@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
]
|
"charliermarsh.ruff",
|
||||||
|
"ms-python.flake8",
|
||||||
|
"ms-python.mypy-type-checker",
|
||||||
|
"ms-vscode.cmake-tools",
|
||||||
|
"EditorConfig.EditorConfig",
|
||||||
|
"streetsidesoftware.code-spell-checker",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
50
.vscode/settings_recommended.json
vendored
50
.vscode/settings_recommended.json
vendored
@ -1,15 +1,53 @@
|
|||||||
{
|
{
|
||||||
"[python]": {
|
|
||||||
"editor.tabSize": 4
|
|
||||||
},
|
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
|
".clang-format": "yaml",
|
||||||
|
".clang-tidy": "yaml",
|
||||||
|
".flake8": "ini",
|
||||||
|
".coveragerc": "ini",
|
||||||
"*.py.in": "python",
|
"*.py.in": "python",
|
||||||
"*.pyi.in": "python"
|
"*.pyi.in": "python",
|
||||||
|
"*requirements*.txt": "pip-requirements",
|
||||||
|
"*requirements*.in": "pip-requirements",
|
||||||
|
"*.cpp.in": "cpp",
|
||||||
|
"*.h.in": "cpp",
|
||||||
|
"*.cmake.in": "cmake",
|
||||||
|
"Makefile.*": "makefile",
|
||||||
|
"*.Makefile": "makefile",
|
||||||
|
"BUCK": "starlark",
|
||||||
|
"BUCK.*": "starlark"
|
||||||
},
|
},
|
||||||
"files.eol": "\n",
|
"files.eol": "\n",
|
||||||
"files.insertFinalNewline": true,
|
"files.insertFinalNewline": true,
|
||||||
"files.trimFinalNewlines": true,
|
"files.trimFinalNewlines": true,
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
"python.linting.enabled": true,
|
"cmake.preferredGenerators": [
|
||||||
"python.linting.flake8Enabled": true
|
"Ninja",
|
||||||
|
"Unix Makefiles"
|
||||||
|
],
|
||||||
|
"cmake.configureEnvironment": {
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||||
|
},
|
||||||
|
"cmake.sourceDirectory": "${workspaceFolder}",
|
||||||
|
"cmake.buildDirectory": "${workspaceFolder}/build",
|
||||||
|
"cmake.configureArgs": [
|
||||||
|
"-DPython_EXECUTABLE=${workspaceFolder}/venv/bin/python",
|
||||||
|
"-DPython_ROOT_DIR=${workspaceFolder}/venv"
|
||||||
|
],
|
||||||
|
"[python]": {
|
||||||
|
"editor.tabSize": 4,
|
||||||
|
"editor.defaultFormatter": "charliermarsh.ruff"
|
||||||
|
},
|
||||||
|
"python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python",
|
||||||
|
"python.analysis.inlayHints.functionReturnTypes": true,
|
||||||
|
"flake8.importStrategy": "fromEnvironment",
|
||||||
|
"flake8.args": [
|
||||||
|
"--append-config=${workspaceFolder}/.flake8"
|
||||||
|
],
|
||||||
|
"ruff.importStrategy": "fromEnvironment",
|
||||||
|
"ruff.lineLength": 88,
|
||||||
|
"ruff.organizeImports": false,
|
||||||
|
"ruff.configurationPreference": "filesystemFirst",
|
||||||
|
"mypy-type-checker.importStrategy": "fromEnvironment",
|
||||||
|
"mypy-type-checker.preferDaemon": true,
|
||||||
|
"mypy-type-checker.reportingScope": "workspace"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user