title: PyCharm procedural __all__ generation and syntax highlighting
body: <p>I'm using this decorator to manage <code>__all__</code> in a DRY manner:</p>
  
  <pre><code>def export(obj):
      mod = sys.modules[obj.__module__]
      if hasattr(mod, '__all__'):
          mod.__all__.append(obj.__name__)
      else:
          mod.__all__ = [obj.__name__]
  
      return obj
  </code></pre>
  
  <p>For names imported with <code>import *</code> PyCharm issues an <code>unresolved reference</code> error, which is understandable, since it doesn't run the code before analysis. But it is an obvious inconvenience.</p>
  
  <p>How would you solve it (or maybe already solved)?</p>
  
  <p><em>My assumptions</em>:</p>
  
  <ul>
  <li>Adding some automatic linter plugin or altering existing PyCharm's inspection code would be fine.</li>
  <li>Something that's actually editing a <code>.py</code> source is viable, but not fine.</li>
  <li>This method is probably not the best one, therefore suggesting another convenient technique of dealing with exports is fine too.</li>
  </ul>