Cursor · PluginsLenguajes#2
Python
Typing, package layout and tests with pytest.
by Prompt Studio
pythonpytest
Contents
Where it goes: .cursor/rules/python.mdc
---
description: Convenciones y buenas prácticas de Python
globs: **/*.py
alwaysApply: false
---
- Python 3.12+. Añade anotaciones de tipo a todas las funciones públicas y pasa `mypy --strict`.
- Usa `pathlib`, `dataclasses` o Pydantic, y f-strings.
- Gestiona dependencias con `uv` o `poetry`; nunca instales paquetes globales.
- Formatea y analiza con `ruff`.
- Escribe pruebas con `pytest`, fixtures y `parametrize`; una prueba por comportamiento.
- Captura excepciones concretas, nunca `except:` vacío.
More in Plugins
Next.js
App Router, Server Components, Server Actions and caching.
React + TypeScript
Function components, hooks and strict typing.
Expo / React Native
Expo Router, styling and mobile performance.
Go
HTTP APIs, error handling and context.
Tailwind + shadcn/ui
Utility classes, design tokens and accessible components.
Ruby on Rails
Rails conventions, Hotwire and tests.