Skip to content

Commit 19350d5

Browse files
authored
add docstrings to settings module (#124)
1 parent b16c2b4 commit 19350d5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ansys/dpf/core/settings.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
2+
"""
3+
settings
4+
========
5+
Customize the behavior of the module.
6+
"""
7+
18
from ansys.dpf.core.misc import module_exists
29
from ansys.dpf.core import misc
310

411
def disable_off_screen_rendering() -> None:
12+
"""No pop up windows appears to plot data with ``matplotlib`` or ``pyvista``"""
513
# enable matplotlib off_screen plotting to avoid test interruption
614
if module_exists("matplotlib"):
715
import matplotlib as mpl
@@ -25,6 +33,16 @@ def set_default_pyvista_config():
2533
pv.rcParams["title"] = "DPF"
2634

2735
def disable_interpreter_properties_evaluation() -> bool:
36+
"""If ``jedi`` module is installed (autocompletion module for most of IDEs), disables the
37+
property evaluation when tab key is pressed.
38+
39+
To use in Jupyter Notebook if autocompletion becomes slow.
40+
41+
Returns
42+
-------
43+
bool
44+
Whether disabling the capability has been possible.
45+
"""
2846
if module_exists("jedi"):
2947
import jedi
3048
jedi.Interpreter._allow_descriptor_getattr_default = False

0 commit comments

Comments
 (0)