optimism

This package init just imports everything from optimism.py, including explicitly the version number (which otherwise would be skipped since it starts with '_'). That way, importing optimism-the-package is the same as importing optimism-the-file, except that private variables are not exported by the package. So you can distribute the package OR just the optimism.py file and both should work the same.

 1"""
 2This package init just imports everything from optimism.py, including
 3explicitly the version number (which otherwise would be skipped since it
 4starts with '_'). That way, importing optimism-the-package is the same as
 5importing optimism-the-file, except that private variables are not
 6exported by the package. So you can distribute the package OR just the
 7optimism.py file and both should work the same.
 8"""
 9
10from .optimism import *
11
12# Setuptools versions on Python 3.10 won't allow us to just import the
13# version from optimism, but we want the version to be defined in that
14# file so that a single-file distribution is equivalent to this packaged
15# distribution. So we define a version here as well, but...
16__version__ = "3.1.4"
17
18# ...then we assert it matches so testing will catch it if I forget to
19# keep them in sync before a release. T_T
20from .optimism import __version__ as match
21assert __version__ == match