title: unset or turn off current module for some attributes
body: <p>I am writing some documentation, where I list the attributes that a duck-typed object must have to fulfill a particular interface. I tried doing something like this:</p>
  
  <pre><code>List of required attributes:
  
  .. py:attribute:: x
  
     The x-coordinate, as a :py:class:`float`.
  
  .. py:attribute:: y
  
     The y-coordinate, as a :py:class:`float`.
  </code></pre>
  
  <p>I am expecting to get a list of attributes with descriptions, but instead of plain names, the documentation ends up with names that include the prior <code>.. py:currentmodule</code> directive. So instead of just <code>x</code>, I end up with <code>my.current.module.x</code>.</p>
  
  <p>Is there any way to do either of the following:</p>
  
  <ol>
  <li>Turn off <code>.. py:currentmodule::</code>. I attempted to set it to the empty string as well as <code>.</code>, but that just generated a warning and kept using the prior value.</li>
  <li>Configure generated attribute names not to include the module in the name (preferably in the link as well).</li>
  </ol>
  
  <p>I would prefer option #2 because I actually have links to objects in the current module in the documentation, so it would be nice to make it clear that these attributes are not in the module without actually changing the current module.</p>
  
  <p>At the moment, my workaround is to temporarily set <code>.. py:currentmodule:: duck</code>, and reinstate after that segment.</p>
  
  <p>I have also tried to write the attribute docs as <code>.. py:attribute:: ~x</code>, <code>.. py:attribute:: !x</code> and <code>.. py:attribute:: .x</code>. All cases include the special character in the name, and the first two fail to generate anchors to the attributes.</p>