Skip to content

Commit

Permalink
Merge pull request #58 from stb-tester/vscode-deprecated-linting-sett…
Browse files Browse the repository at this point in the history
…ings

Update VSCode linting settings
  • Loading branch information
wmanley authored Nov 27, 2023
2 parents b59f231 + 33f288e commit b314dc0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions stbt_rig.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,10 @@ def _update_vscode_config():
"git.fetchOnPull": True,
"git.pruneOnFetch": True,
"git.pullBeforeCheckout": True,
"pylint.args": ["--load-plugins=_stbt.pylint_plugin"],
"pylint.path": ["pylint"],
"python.envFile": "${workspaceFolder}/.env",
"python.linting.enabled": True,
"python.linting.mypyEnabled": False,
"python.testing.nosetestsEnabled": False,
"python.linting.pylintArgs": ["--load-plugins=_stbt.pylint_plugin"],
"python.linting.pylintEnabled": True,
"python.testing.pytestArgs": [
"-p", "stbt_rig",
"-p", "no:python",
Expand All @@ -934,6 +932,13 @@ def _update_vscode_config():
}
]
}
DEPRECATED_KEYS = {
"python.linting.enabled",
"python.linting.mypyEnabled",
"python.linting.pylintArgs",
"python.linting.pylintEnabled",
}

try:
with open(".vscode/settings.json") as f:
cfg = json.load(f)
Expand All @@ -945,6 +950,10 @@ def _update_vscode_config():
if cfg.get(k) != v:
cfg[k] = v
modified = True
for k in list(cfg.keys()):
if k in DEPRECATED_KEYS:
del cfg[k]
modified = True

if modified:
mkdir_p(".vscode")
Expand Down

0 comments on commit b314dc0

Please sign in to comment.