title: Static analysis of Python code, in a codebase that includes multiple implementations of the same module all having the same interface
body: <p>I don't miss having to type out type declarations all the time - that's one of many reasons I love python.</p>
  
  <p>But I like to at least have some "variable used before set", "variable set but never used" and "wrong number of arguments" checks, to avoid trivial errors.</p>
  
  <p>pylint is reportedly the most stringent static analysis tool for Python, so I've been using it to get such checks.</p>
  
  <p>However, I have a bit of a disappointment with pylint: EG, I have 3 modules that do compression in 3 different ways (subprocess, ctypes, bz2 module), and I want to add a 4th (the new lzma module in CPython 3.3, which hasn't yet been released).  These modules all have slightly different portability and behavior.  I want pylint to be able to check these alternatives, but it seems to get lost.</p>
  
  <p>So I started using a tiny "dispatch module" for a while, that would do nothing but choose between the different compression alternatives, and that Wouldn't Be Pylint'd, and that sort of works, but not as well as I'd like.  It allows me to pylint most of my code, but it seems to make pylint unable to check uses of the compression code.</p>
  
  <p>Is there some way of getting static analysis for python that allows the checking of multiple modules all providing the same interface, as well as calls into those modules from the same code?  Maybe pyflakes?  Or a magic "# pylint:" hint I don't don't know about?</p>
  
  <p>Thanks!</p>