title: Exporting an enum class from a module by default
body: <p>I have declared an enum class within my class as below.</p>
  
  <p>module xx</p>
  
  <pre><code>class X(object):
      class my_enum(Enum):
          a = 1
          b = 2
  
      def test (self, p1=my_enum.a):
          print(p1)
  </code></pre>
  
  <p>my module:</p>
  
  <pre><code>from xx import X
  o = X(X.my_enum.a)
  </code></pre>
  
  <p>The problem is that the pycharm tool-tip says <code>self, p1=my_enum.a</code></p>
  
  <p>When I write as below to get a correct tool-tip it gives an unresolved reference error for LabelledUI.X.p1:</p>
  
  <p>module xx</p>
  
  <pre><code>class X(object):
      class my_enum(Enum):
          a = 1
          b = 2
  
      def test (self, X.p1=my_enum.a):
          print(p1)
  </code></pre>
  
  <p>Now I can create the enum class out of contained class but that will require an extra import statement which I am trying to avoid to reduce user effort.</p>
  
  <p>module xx</p>
  
  <pre><code>class my_enum(Enum):
          a = 1
          b = 2
  
  
  class X(object):
      def test (self, X.p1=my_enum.a):
          print(p1)
  </code></pre>
  
  <p>my module:</p>
  
  <pre><code>from xx import X, my_enum
  o = X(X.my_enum.a)
  </code></pre>
  
  <p>Any suggestions how I can create it in such a way that the user tool-tip reads the correct enum class without the user having to add an extra import statement?</p>
  
  <p>Is there any way I can export this enum by default without the user having to do an <code>from xx import *</code></p>