Skip to content

Releases: ludo-technologies/python-best-practices

v0.2.0

06 Jun 15:11
083b37e

Choose a tag to compare

v0.2.0

Corrections to the rule set, surfaced by a cross-cutting review with subagents. This release fixes 8 high-severity issues — incorrect or unsafe code examples and one structural mismatch.

Fixes & Improvements

  • async-semaphore — Create the Semaphore inside a running loop (avoid wrong-loop RuntimeError); cache one semaphore per loop and drop the module-level example
  • async-create-task — Fix collections.abc.Set misuse → set[asyncio.Task[None]]; retrieve task results in the done-callback; clarify fire-and-forget vs. TaskGroup
  • async-gather — Inspect return_exceptions=True results with isinstance, handling CancelledError (a BaseException) explicitly; note siblings keep running on default failure; mention asyncio.timeout()
  • design-single-responsibility — Flag SHA-256 as unsafe for passwords (use argon2/bcrypt); drop field-less @dataclass usage
  • oop-dataclass — Document the mutable-default pitfall (field(default_factory=...)), frozen/__hash__, and Decimal for money
  • oop-protocol — Add an ABC example for shared implementation and the @runtime_checkable signature limitation
  • oop-property — Warn against property overuse; assign via the setter in __init__; note cached_property is not thread-safe
  • pkg-uv — Lead with the uv.lock project workflow (uv add/lock/sync/run); demote uv pip compile to a pip-compatibility section
  • Moved tooling.md out of rules/ so the rule count (18) matches the directory contents

Full Changelog: v0.1.0...v0.2.0

v0.1.0

30 Jan 13:02
8b9f0b2

Choose a tag to compare

Initial Release

Python best practices skill for AI coding agents.

Skills

coding-standards - 18 rules across 4 categories

  • Performance Optimization
  • Async Processing
  • Design Principles
  • Object-Oriented Programming

tooling - 7 rules across 6 categories

  • Analysis, Linting, Type Checking, Formatting, Testing, Package Management

Installation

uvx add-skills ludo-technologies/python-best-practices