mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-28 21:45:27 +08:00
* ci(devcontainer): Debian 13 Trixie + Python 3.14, Ruff settings, drop .vscode Bumps the base image to 3.14-trixie purely via devcontainer.json's build.args.VARIANT (the Dockerfile's ARG reads it), so the Dockerfile itself is untouched and keeps installing requirements + pipx pre-commit/ruff. - VARIANT 3.13-bookworm -> 3.14-trixie (Debian 13, latest stable CPython). - Replace removed python.linting.*/blackPath settings with Ruff format-on-save + fixAll/organizeImports (matches pre-commit and CI); add the Ruff extension. - Delete .vscode/settings.json: pre-commit/Ruff cover this now. Keeps the change to .json files only. * ci(devcontainer): use prebuilt image instead of broken Dockerfile build The devcontainer image build fails on main: the Dockerfile does `COPY requirements.txt`, but that file was removed when the repo moved its dependencies to pyproject.toml, so there is nothing to copy. Switch devcontainer.json to pull the upstream mcr.microsoft.com/devcontainers/python image and install pre-commit/ruff/uv in postCreateCommand. Fully within .json so it stays keeper-safe; the now-unused Dockerfile can be dropped in a follow-up once the keeper accepts the Dockerfile filename (#228). * Update .devcontainer/devcontainer.json --------- Co-authored-by: Christian Clauss <cclauss@me.com>
Development Container
This is Devcontainer configuration to provide a consistent development environment for all contributors.
Features
- Pre-configured Python environment
- Automatic installation of pre-commit hooks
- Ruff linter ready to check your code
- Oh My Zsh with plugins:
zsh-autosuggestionszsh-syntax-highlighting
Usage
-
Install Docker and Visual Studio Code
-
Install the Remote - Containers extension in VS Code
-
Do
CTRL+P, paste this command and pressEnterext install ms-vscode-remote.remote-containers
-
-
Open this repository in VS Code
-
When prompted, click "Reopen in Container"
-
Wait for the environment to build and initialize
After setup:
pre-commithooks are installedruffand other tools are available- The shell uses Zsh by default
Tips
To manually run checks on all files:
pre-commit run --all-files
For further information here's Microsoft tutorial about devcontainers.