Python Code Hygiene
Typing, object-model, exception, asyncio, import, and packaging hygiene.
Select one bounded recipe. Start in audit mode; authorize fixes only after reviewing the candidate evidence.
Recipes
Python typing Any and ignore debt
developmentBounded audit or remediation to narrow Any, casts, and type-ignore suppressions at trusted boundaries.
Python mutable-default, dataclass, and sentinel hygiene
developmentBounded audit or remediation to remove shared mutable defaults and ambiguous sentinel values.
Python exception, context, and resource lifecycle
developmentBounded audit or remediation to preserve exception context and deterministically release files, locks, sessions, and generators.
Python asyncio task cancellation and timeouts
developmentBounded audit or remediation to eliminate orphaned tasks, swallowed cancellation, and unbounded awaits.
Python import, packaging, and module boundaries
developmentBounded audit or remediation to remove import cycles and make package exports and runtime discovery explicit.