title: How do I document classes without the module name?
body: <p>I am trying to document a python package with <code>sphinx</code> and have successfully generated html files. The package I am documenting consists of a set of <code>*.py</code> files, most containing one class with a couple of files being genuine modules with functions defined. I do not need to expose the fact that each class is in a module so I have added suitable <code>from</code> statements in the <code>__init__.py</code> file e.g.</p>
  
  <pre><code>from base import Base
  </code></pre>
  
  <p>so that the user can use the <code>import pkg</code> command and does not then have to specify the module that contains the class:</p>
  
  <pre><code>import pkg
  class MyBase(pkg.Base):  # instead of pkg.base.Base ...
  ...
  </code></pre>
  
  <p>The problem is that sphinx insists on documenting the class as <code>pkg.base.Base</code>. I have tried to set the <code>add_module_names = False</code> in <code>conf.py</code>. However this results in sphinx showing the class as simply <code>Base</code> instead of <code>pkg.Base</code>. Additionally this also ruins the documentation of the couple of <code>*.py</code> files that <em>are</em> modules.</p>
  
  <p>How do I make <code>sphinx</code> show a class as <code>pkg.Base</code>? 
  And how do I set the <code>add_module_names</code> directive selectively for each <code>*.py</code> file?</p>