from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager

__all__ = [
    'PostgresCheckpoints',
    'PostgresContentsManager',
]

try:
    import IPython  # noqa
except ImportError:
    raise ImportError(
        "No IPython installation found.\n"
        "To install pgcontents with the latest Jupyter Notebook"
        " run 'pip install pgcontents[ipy4]b'.\n"
        "To install with the legacy IPython Notebook"
        " run 'pip install pgcontents[ipy3]'.\n"
    )

from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager

__all__ = [
    'PostgresCheckpoints',
    'PostgresContentsManager',
]

Add warning if IPython isn't installed.
DOC: Add warning if IPython isn't installed.

+ try:
+     import IPython  # noqa
+ except ImportError:
+     raise ImportError(
+         "No IPython installation found.\n"
+         "To install pgcontents with the latest Jupyter Notebook"
+         " run 'pip install pgcontents[ipy4]b'.\n"
+         "To install with the legacy IPython Notebook"
+         " run 'pip install pgcontents[ipy3]'.\n"
+     )
+ 
  from .checkpoints import PostgresCheckpoints
  from .pgmanager import PostgresContentsManager
  
  __all__ = [
      'PostgresCheckpoints',
      'PostgresContentsManager',
  ]
  
Add warning if IPython isn't installed.
## Code Before:
from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager

__all__ = [
    'PostgresCheckpoints',
    'PostgresContentsManager',
]

## Instruction:
Add warning if IPython isn't installed.
## Code After:
try:
    import IPython  # noqa
except ImportError:
    raise ImportError(
        "No IPython installation found.\n"
        "To install pgcontents with the latest Jupyter Notebook"
        " run 'pip install pgcontents[ipy4]b'.\n"
        "To install with the legacy IPython Notebook"
        " run 'pip install pgcontents[ipy3]'.\n"
    )

from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager

__all__ = [
    'PostgresCheckpoints',
    'PostgresContentsManager',
]
