Skip to content

Commit

Permalink
fix sphinx building
Browse files Browse the repository at this point in the history
  • Loading branch information
marscher committed May 17, 2021
1 parent 4ad897e commit 69feb83
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,27 @@
import sys
import typing

import ipywidgets
import pandas as _
import traitlets
import xarray


def _workaround_imports_typechecking():
"""Load some packages needed for type annotations."""
import ipywidgets
import pandas as _
import xarray


def _prevent_sphinx_circular_imports_bug():
# https://github.com/sphinx-doc/sphinx/issues/9243
import sphinx.builders.html
import sphinx.builders.latex
import sphinx.builders.texinfo
import sphinx.builders.text
import sphinx.ext.autodoc


_prevent_sphinx_circular_imports_bug()
_workaround_imports_typechecking()

typing.TYPE_CHECKING = True
try:
Expand Down

0 comments on commit 69feb83

Please sign in to comment.