Skip to content

Instantly share code, notes, and snippets.

@lmmx
Created August 13, 2024 17:42
Show Gist options
  • Save lmmx/f99dc4b94aca9b3379a46839f9235031 to your computer and use it in GitHub Desktop.
Save lmmx/f99dc4b94aca9b3379a46839f9235031 to your computer and use it in GitHub Desktop.
Prompt for nice Python

Code style: one file, no external libraries besides pathlib and Pydantic, never use with open, Python 3.10+ modern code style (list not List style hints), no bloat or sprawl. Prefer list/dictcomps over loops where possible. Don't use global or otherwise 'free' variables for configuration when you could use a Pydantic model, and set default values on fields rather than setting them at runtime where applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment