Lintian dissects Debian packages and reports bugs and policy violations. It contains automated checks for many aspects of Debian policy as well as some checks for common errors.
lintian4python was an experimental flavor of Lintian designed to check packages implemented in Python.
Parts of it have been revived as a distro-agnostic static code checker, pydiatra.