Skip to content

Setting Up Your Python Development Environment for aider-lint-fixer

This tutorial walks you through configuring a modern Python workflow that matches the toolchain used by aider-lint-fixer.

1. Install Python via pyenv

aider-lint-fixer targets Python 3.11+.

# Install pyenv (macOS / Linux)
brew install pyenv            # or: curl https://pyenv.run | bash

# Install and activate the required version
pyenv install 3.11.9
pyenv local 3.11.9            # writes .python-version

2. Create an isolated virtual environment

python -m venv .venv
source .venv/bin/activate      # Windows: .venv\Scripts\activate

Tip: The project’s Makefile contains convenience targets like make venv that automate these steps.

3. Install project dependencies

pip install -r requirements.txt -r requirements-test.txt

These files pin runtime and testing libraries (e.g., aider-chat, ansible-lint, pytest).

pip install pre-commit
pre-commit install

Hooks automatically run linters & formatters on every commit (ruff, black, flake8).

Create .vscode/settings.json:

{
  "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
  "python.testing.pytestEnabled": true,
  "python.formatting.provider": "black",
  "editor.codeActionsOnSave": {
    "source.organizeImports": "always"
  }
}

6. Running the CLI

python -m aider_lint_fixer --help

7. Running the test suite

pytest -q

Next Steps