Engineering

AI coding assistants in your Python team: speed without losing quality

Coding assistants write tests, boilerplate and first drafts in a fraction of the time. They also write convincing-looking mistakes. A few clear agreements let you keep the gains and limit the risk.

Engineering3 min readPython People editorial team

The gains are real, but not free

Where it pays off

  • Tests, boilerplate and converting code from one format to another
  • Exploring and explaining an unfamiliar codebase
  • Refactoring, provided there are tests guarding the behaviour

Where to take extra care

  • Invented functions and outdated APIs that look plausible
  • Subtle security flaws, such as missing input validation
  • Package names that don't exist, or are spelled slightly differently from the real package

The more code gets generated, the more review and testing matter. Not less.

Six agreements for your team

  1. The author is accountable

    Whoever submits code stands behind it, whoever or whatever wrote it. "The assistant did that" is not an argument in a review.

  2. Review stays mandatory

    Generated code gets the same review as any other code. Keep pull requests small so that review stays meaningful.

  3. Tests for generated logic

    For new logic, have the tests written and checked first, or review generated tests extra critically. A test that always passes proves nothing.

  4. No secrets or customer data in prompts

    Agree which tools are allowed and what they do with your code and data. Put contractual agreements on storage and training in place.

  5. Check dependencies

    Does the package really exist, is it maintained, and is it the right name? Have your pipeline check this automatically.

  6. Measure the effect

    Look at lead time, production bugs and review time. The number of generated lines says nothing about value.

AI literacy is part of it

Since 2 February 2025, organisations deploying AI systems in the EU must take measures to ensure the AI literacy of their staff. Source: EU AI Act, Article 4 (opens in a new tab) For a development team, that means knowing what an assistant is good at, where it goes wrong and which data has no place in it.

A senior architect who uses these tools every day can set these agreements and lead by example. That works better than a policy document on its own.

In a Python project: let the tooling check

Agreements work best when the tooling enforces them. In a Python project you set this down in pyproject.toml. Code from an assistant then meets exactly the same bar as code from a person.

[tool.ruff.lint]
select = ["E", "F", "I", "B", "S"]  # S: security rules

[tool.mypy]
strict = true

[tool.pytest.ini_options]
addopts = "--cov=app --cov-fail-under=80"

Ruff catches style and security issues, mypy catches the type errors assistants make surprisingly often, and pytest with a coverage threshold keeps untested code out. Run it all in pre-commit and in CI, so nobody can skip it.

Need a Python developer?

Call us or send your vacancy. Within 48 hours you hear which developers in our network fit and what it costs.