From 871aea97fc69ffb07ee0dba6a95454ea7badb1a6 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 29 May 2026 10:56:43 +0800 Subject: [PATCH] Devcontainer updates - remove obsolete intellicode - terminal font change - add PyQt4 stubs for linter/autocomplete --- .devcontainer/devcontainer.json | 8 ++++---- .devcontainer/postCreateCommand.sh | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d6e710210..a4f4cdea4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,8 +13,7 @@ "ms-vsliveshare.vsliveshare", "nwgh.bandit", "the-compiler.python-tox", - "vscode-icons-team.vscode-icons", - "visualstudioexptteam.vscodeintellicode" + "vscode-icons-team.vscode-icons" ], "settings": { "python.defaultInterpreterPath": "/usr/bin/python3", @@ -22,10 +21,11 @@ "flake8.importStrategy": "fromEnvironment", "flake8.args": ["--config=setup.cfg"], "pylint.interpreter": ["/usr/bin/python3"], - "pylint.args": ["--rcfile=setup.cfg", "--init-hook", "import sys;sys.path.append('src')"], + "pylint.args": ["--rcfile=setup.cfg", "--init-hook", + "import sys;sys.path.append('src')"], "terminal.integrated.shell.linux": "/usr/bin/zsh", "terminal.integrated.defaultProfile.linux": "zsh", - "terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'", + "terminal.integrated.fontFamily": "'CommitMono Nerd Font'", "terminal.integrated.fontSize": 14, "files.exclude": { "**/CODE_OF_CONDUCT.md": true, diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index f04a3b7d3..8956ae7aa 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -3,7 +3,14 @@ pip3 install -r requirements.txt pip3 install -r kivy-requirements.txt +# PyQt4 stubs, for better linter/autocomplete +git clone https://github.com/TheKewlStore/PyQt4-Stubs.git /tmp/pyqt4-stubs +P2DIR=$(python2 -c "import site; print(site.getusersitepackages())")/ +P3DIR=$(python3 -c "import site; print(site.getusersitepackages())")/ +cp -r /tmp/pyqt4-stubs/* "${P2DIR}" +cp -r /tmp/pyqt4-stubs/* "${P3DIR}" + # Linter tools needed by the VS Code extensions (ms-python.flake8, # ms-python.pylint, nwgh.bandit). The apt-installed system packages # are not visible to the VS Code Python interpreter. -pip3 install flake8 pylint bandit \ No newline at end of file +pip3 install flake8 pylint bandit