Python Conventions

Python tooling conventions for this organization. Use when working with Python projects, fixing linting issues, or managing dependencies. Use when this capability is needed.

tomevault-io d4d7a46 2 files · 1.8 KB Updated

File contents

Python Conventions

Package Management

Use uv exclusively:

uv sync          # Install dependencies
uv lock          # Regenerate lock file
uv add "pkg"     # Add dependency
uv run <cmd>     # Run in project environment

Lock files: Never manually edit. Delete and regenerate:

rm uv.lock && uv lock

Linting

Tools (in order):

  1. ruff check --fix - Linting
  2. ruff format - Formatting
  3. mypy - Type checking

Run all: uv run pre-commit run --all-files

Inline Ignores

Always include justification:

from module import thing  # noqa: PLC0415 - Lazy import after validation

Environment

Clear inherited environments:

unset VIRTUAL_ENV
uv sync

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/vectorinstitute--aieng-bot--python-conventions commit d4d7a46b4b

Frequently asked questions

npx skillmds@latest add tomevault-io/python-conventions