@@ -208,17 +208,23 @@ def _wrap_listing_functions(self):
208208 # Wrapping LISTING FUNCTIONS.
209209 def wrap_listing_function (func ):
210210 # Injecting doc string modification
211- func .__func__ .__doc__ = inject_docs (func .__func__ .__doc__ )
211+ if hasattr (func , "__func__" ):
212+ func .__func__ .__doc__ = inject_docs (func .__func__ .__doc__ )
213+ else : # pragma: no cover
214+ func .__doc__ = inject_docs (func .__doc__ )
212215
213216 @wraps (func )
214217 def inner_wrapper (* args , ** kwargs ):
215218 return CommandListingOutput (func (* args , ** kwargs ))
216219
217220 return inner_wrapper
218221
219- def wrap_BC_listing_function (func ):
222+ def wrap_bc_listing_function (func ):
220223 # Injecting doc string modification
221- func .__func__ .__doc__ = inject_docs (func .__func__ .__doc__ )
224+ if hasattr (func , "__func__" ):
225+ func .__func__ .__doc__ = inject_docs (func .__func__ .__doc__ )
226+ else : # pragma: no cover
227+ func .__doc__ = inject_docs (func .__doc__ )
222228
223229 @wraps (func )
224230 def inner_wrapper (* args , ** kwargs ):
@@ -235,7 +241,7 @@ def inner_wrapper(*args, **kwargs):
235241
236242 if name [0 :4 ].upper () in CMD_BC_LISTING and name in dir (Commands ):
237243 func = self .__getattribute__ (name )
238- setattr (self , name , wrap_BC_listing_function (func ))
244+ setattr (self , name , wrap_bc_listing_function (func ))
239245
240246 @property
241247 def _name (self ): # pragma: no cover
@@ -408,7 +414,7 @@ def chain_commands(self):
408414 """
409415 if self ._distributed :
410416 raise RuntimeError (
411- "chained commands are not permitted in distributed ansys."
417+ "Chained commands are not permitted in distributed ansys."
412418 )
413419 return self ._chain_commands (self )
414420
@@ -1902,8 +1908,9 @@ def get(
19021908 return value
19031909
19041910 @property
1905- def jobname (self ):
1906- """MAPDL job name.
1911+ def jobname (self ) -> str :
1912+ """
1913+ MAPDL job name.
19071914
19081915 This is requested from the active mapdl instance.
19091916 """
@@ -1914,7 +1921,7 @@ def jobname(self):
19141921 return self ._jobname
19151922
19161923 @jobname .setter
1917- def jobname (self , new_jobname ):
1924+ def jobname (self , new_jobname : str ):
19181925 """Set the jobname"""
19191926 self .finish (mute = True )
19201927 self .filname (new_jobname , mute = True )
@@ -1932,7 +1939,7 @@ def modal_analysis(
19321939 memory_option = "" ,
19331940 mxpand = "" ,
19341941 elcalc = False ,
1935- ):
1942+ ) -> str :
19361943 """Run a modal with basic settings analysis
19371944
19381945 Parameters
@@ -2097,10 +2104,12 @@ def modal_analysis(
20972104 self .finish (mute = True )
20982105 return out
20992106
2100- def run_multiline (self , commands ):
2107+ def run_multiline (self , commands ) -> str :
21012108 """Run several commands as a single block
21022109
2103- .. warning:: This function is being deprecated. Please use `input_strings` instead.
2110+ .. deprecated:: 0.61.0
2111+ This function is being deprecated. Please use `input_strings`
2112+ instead.
21042113
21052114 Parameters
21062115 ----------
@@ -2165,8 +2174,10 @@ def run_multiline(self, commands):
21652174 )
21662175 return self .input_strings (commands = commands )
21672176
2168- def input_strings (self , commands ):
2169- """Run several commands as a single block.
2177+ def input_strings (self , commands ) -> str :
2178+ """
2179+ Run several commands as a single block.
2180+
21702181 These commands are all in a single string or in list of strings.
21712182
21722183 Parameters
@@ -2208,7 +2219,6 @@ def input_strings(self, commands):
22082219 KEYOPT( 1- 6)= 0 0 0 0 0 0
22092220 KEYOPT( 7-12)= 0 0 0 0 0 0
22102221 KEYOPT(13-18)= 0 0 0 0 0 0
2211- output continues...
22122222
22132223 """
22142224 if isinstance (commands , str ):
@@ -2218,10 +2228,12 @@ def input_strings(self, commands):
22182228 self ._flush_stored ()
22192229 return self ._response
22202230
2221- def run (self , command , write_to_log = True , mute = None , ** kwargs ):
2222- """Run single APDL command.
2231+ def run (self , command , write_to_log = True , mute = None , ** kwargs ) -> str :
2232+ """
2233+ Run single APDL command.
22232234
2224- For multiple commands, use :func:`Mapdl.input_strings() <ansys.mapdl.core.Mapdl.input_strings>`.
2235+ For multiple commands, use :func:`Mapdl.input_strings()
2236+ <ansys.mapdl.core.Mapdl.input_strings>`.
22252237
22262238 Parameters
22272239 ----------
@@ -2378,8 +2390,9 @@ def run(self, command, write_to_log=True, mute=None, **kwargs):
23782390 return self ._response
23792391
23802392 @property
2381- def ignore_errors (self ):
2382- """Flag to ignore MAPDL errors.
2393+ def ignore_errors (self ) -> bool :
2394+ """
2395+ Flag to ignore MAPDL errors.
23832396
23842397 Normally, any string containing "*** ERROR ***" from MAPDL
23852398 will trigger a ``MapdlRuntimeError``. Set this to ``True`` to
@@ -2392,7 +2405,8 @@ def ignore_errors(self, value):
23922405 self ._ignore_errors = bool (value )
23932406
23942407 def load_array (self , name , array ):
2395- """Load an array from Python to MAPDL.
2408+ """
2409+ Load an array from Python to MAPDL.
23962410
23972411 Uses ``VREAD`` to transfer the array.
23982412 The format of the numbers used in the intermediate file is F24.18.
@@ -2475,7 +2489,7 @@ def load_array(self, name, array):
24752489 def load_table (self , name , array , var1 = "" , var2 = "" , var3 = "" , csysid = "" ):
24762490 """Load a table from Python to MAPDL.
24772491
2478- Uses TREAD to transfer the table.
2492+ Uses `` TREAD`` to transfer the table.
24792493 It should be noticed that PyMAPDL when query a table, it will return
24802494 the table but not its axis (meaning it will return ``table[1:,1:]``).
24812495
@@ -2603,8 +2617,9 @@ def _run(self, *args, **kwargs): # pragma: no cover
26032617 raise NotImplementedError ("Implemented by child class" )
26042618
26052619 @property
2606- def version (self ):
2607- """MAPDL build version
2620+ def version (self ) -> float :
2621+ """
2622+ MAPDL build version.
26082623
26092624 Examples
26102625 --------
@@ -2615,8 +2630,9 @@ def version(self):
26152630
26162631 @property
26172632 @supress_logging
2618- def directory (self ):
2619- """Current MAPDL directory
2633+ def directory (self ) -> str :
2634+ """
2635+ Current MAPDL directory.
26202636
26212637 Examples
26222638 --------
0 commit comments