legout/skills

modern-python

Configures Python projects with modern tooling (uv, ruff, ty).

Vedi sorgente

Come usare

  1. Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
  2. Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
  3. Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/legout/skills --skill modern-python

Prima di iniziare

  • L’installazione non include abbonamenti, quote API o accesso ai file.
  • Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

Modern Python

Before changing a project, read its instructions and current configuration, preserve supported Python versions, and run installed CLI help. Do not replace a working toolchain unless the user requests migration and the replacement reaches validation parity.

Route

Defaults for new work

  • Manage dependencies with uv add, uv remove, and uv sync; run commands with uv run.
  • Use dependency groups for development tools.
  • Use Ruff for lint and format, ty for type checks, and pytest for tests unless project constraints require otherwise.
  • Prefer uv_build for ordinary new packages.
  • Never manually activate or manage a virtualenv.

Minimal project

bash
uv init myproject
cd myproject
uv add requests
uv add --group dev pytest ruff ty
uv run ruff check .
uv run ty check
uv run pytest

For repository documentation, follow its existing system. If it uses Zensical, validate with uv run zensical build; use uv run zensical serve only for interactive preview.

Verification

Run the project's existing checks plus Ruff, ty, and tests when configured. During migration, compare old and new validation results before deleting legacy configuration. Hand versioning or publication to make-release.

Source

Adapted under CC-BY-SA-4.0 from Trail of Bits' `modern-python` package, pinned to commit d3323cefbcf645678b8dc481de204b02ad3d02dc. See sources.json and THIRD_PARTY_NOTICES.md.

dallo stesso repository

Altri Skills

Tutti gli Skills