title: How can I prevent sphinx from displaying the full path to my class?
body: <p>I have a project structure like this:</p>
  
  <pre><code>package/
      __init__.py
      module.py
  </code></pre>
  
  <p><code>__init__.py</code> contains:</p>
  
  <pre><code>from .module import Class
  </code></pre>
  
  <p><code>module.py</code> contains:</p>
  
  <pre><code>class Class:
      pass
  </code></pre>
  
  <hr>
  
  <p>Using <code>sphinx-apidoc -o package/docs/ package/</code> and <code>sphinx-build package/docs/ package/docs/_build</code>, the documentation for <code>Class</code> looks like this:</p>
  
  <blockquote>
    <p><em>class</em> package.module.<strong>Class</strong></p>
    
    <p>&nbsp;&nbsp;&nbsp;&nbsp; Bases: <strong>object</strong></p>
  </blockquote>
  
  <p>I'd like to have this output instead:</p>
  
  <blockquote>
    <p><em>class</em> package.<strong>Class</strong></p>
    
    <p>&nbsp;&nbsp;&nbsp;&nbsp; Bases: <strong>object</strong></p>
  </blockquote>
  
  <p>Or, even better, without the package name:</p>
  
  <blockquote>
    <p><em>class</em> <strong>Class</strong></p>
    
    <p>&nbsp;&nbsp;&nbsp;&nbsp; Bases: <strong>object</strong></p>
  </blockquote>
  
  <p>The user doesn't have to know in which file the class is defined; this information is completely irrelevant, if not confusing. Since <code>__init__.py</code> is importing <code>Class</code> directly into the package's namespace, users will import this class as <code>from package import Class</code>, not as <code>from package.module import Class</code>, and I want the docs to reflect that.</p>
  
  <p>Is there a way to have sphinx output the path relative to the package's namespace?</p>