from .events import Event

__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'

__all__ = ['Event']

from .events import Event

__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'

__all__ = ['Event']

try:
    import pkg_resources
    dist = pkg_resources.get_distribution('yg.emanate')
    __version__ = dist.version
except Exception:
    __version__ = 'unknown'

Load the version from the package metadata rather than trying to maintain it in a third place.
Load the version from the package metadata rather than trying to maintain it in a third place.

  from .events import Event
  
  __author__ = 'YouGov, plc'
  __email__ = 'dev@yougov.com'
- __version__ = '0.3.0'
  
  __all__ = ['Event']
  
+ try:
+     import pkg_resources
+     dist = pkg_resources.get_distribution('yg.emanate')
+     __version__ = dist.version
+ except Exception:
+     __version__ = 'unknown'
+ 
Load the version from the package metadata rather than trying to maintain it in a third place.
## Code Before:
from .events import Event

__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'
__version__ = '0.3.0'

__all__ = ['Event']

## Instruction:
Load the version from the package metadata rather than trying to maintain it in a third place.
## Code After:
from .events import Event

__author__ = 'YouGov, plc'
__email__ = 'dev@yougov.com'

__all__ = ['Event']

try:
    import pkg_resources
    dist = pkg_resources.get_distribution('yg.emanate')
    __version__ = dist.version
except Exception:
    __version__ = 'unknown'
