Skip to content

Commit

Permalink
Pyvista 0.40 warnings (#280)
Browse files Browse the repository at this point in the history
* fixing import warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removing unused import

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
germa89 and pre-commit-ci[bot] authored Jul 7, 2023
1 parent ea5c135 commit aa1501d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ansys/mapdl/reader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import appdirs

# Per contract with Sphinx-Gallery, this method must be available at top level
from pyvista.utilities.sphinx_gallery import _get_sg_image_scraper
try:
# for pyvista >= 0.40
from pyvista.plotting.utilities import _get_sg_image_scraper
except ImportError:
from pyvista.utilities.sphinx_gallery import _get_sg_image_scraper


from ansys.mapdl.reader import examples
from ansys.mapdl.reader._version import __version__
Expand Down
8 changes: 7 additions & 1 deletion ansys/mapdl/reader/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@

import numpy as np
import pyvista
from pyvista.utilities.errors import GPUInfo

try:
# for pyvista >= 0.40
from pyvista.report import GPUInfo
except ImportError:
from pyvista.utilities.errors import GPUInfo

import scooby


Expand Down

0 comments on commit aa1501d

Please sign in to comment.