CodeSight Blog

Python Code Review Patterns

Technical deep-dives on the bugs that slip past every code review. Async races, Django N+1 queries, type hint traps — and how automated review catches them before production.

All Posts
Python Testing

Python Testing Anti-Patterns: 5 Unit Tests That Pass But Prove Nothing

Testing the mock not the code, assertion-free tests, expected values that mirror the implementation, probing private details, and parametrize that skips real edge cases — 5 anti-patterns that keep CI green while catching zero real bugs.

9 min read
Python Type Hints

Python Type Hints: 5 Patterns That Break at Runtime

mypy says green. Production says otherwise. Optional without None checks, TypedDict at runtime, covariant generics, decorator signature loss, and mutable defaults — the 5 Python typing mistakes that pass the linter and break in prod.

8 min read
Django ORM Performance

Django ORM Performance: 5 N+1 Queries Hiding in Your Codebase

select_related vs prefetch_related, list comprehension N+1, template-level lazy loads, aggregation shortcuts, and DRF serializer queries — the 5 Django N+1 patterns that kill performance silently.

7 min read
Python Code Review

5 Python PR Bugs Your Reviewer Missed

Async/await races, Django ORM N+1 queries, silent exception swallowing — the 5 Python PR bugs that slip past every code review, and how automated review catches them.

8 min read
📋

Python Code Review Cheatsheet

5 async, Django, and type hint bugs that ship to production — and the one-line fix for each. No signup required to read, email to download.