Skip to content

Commit 09a77bb

Browse files
germa89Copilotpyansys-ci-bot
authored
fix: improve code quality and numpydoc documentation (#4125)
* fix: improve code quality and numpydoc documentation - Fix typo in _get_file_name docstring parameter description - Replace bare except clauses with specific OSError exceptions in launcher.py - Remove duplicate logging statement in licensing.py, use LOG.info instead - Add missing Parameters and Returns sections to Information class methods - Fix GL02 docstring formatting issues (closing quotes placement) - Add Returns section to convert.py format_using_autopep8 method * fix: enable additional docstring checks for improved documentation quality * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: adding changelog file 4125.fixed.md [dependabot-skip] * fix: enhance docstrings for MAPDL information properties to include return types * fix: improve docstrings for GrpcError to include parameters and return types * fix: update docstrings in convert.py to include parameters and return types * fix: enhance docstrings in mapdl_extended.py to include parameters and return types * chore: adding changelog file 4125.miscellaneous.md [dependabot-skip] * fix: GL02 numpydoc issue * fix: some PR01 issues. * fix: enhance docstrings for return values in multiple classes * fix: add test for title property in MapdlInfo class * fix: all issues in information --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
1 parent 3690b22 commit 09a77bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+943
-565
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix: improve code quality and numpydoc documentation

doc/post_process_tex.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Validate the PNG images in the build/latex/ directory
22
3-
Removes invalid PNGs (probably GIF)
4-
3+
Removes invalid PNGs (probably GIF).
54
"""
65

76
from glob import glob

src/ansys/mapdl/core/_commands/apdl/array_parameters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,6 @@ def starvput(
11251125
* - ETAB
11261126
- Lab
11271127
- Any user-defined element table label ( :ref:`etable` ).
1128-
11291128
"""
11301129
command = (
11311130
f"*VPUT,{parr},{entity},{entnum},{item1},{it1num},{item2},{it2num},{kloop}"

src/ansys/mapdl/core/_commands/apdl/matrix_operations.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,6 @@ def lsdump(self, enginename: str = "", filename: str = "", **kwargs):
12651265
:ref:`lsrestore` command.
12661266
12671267
A BCS Sparse Solver can be dumped only if uses the ``INCORE`` memory option (see :ref:`bcsoption` ).
1268-
1269-
12701268
"""
12711269
command = f"*LSDUMP,{enginename},{filename}"
12721270
return self.run(command, **kwargs)
@@ -1427,8 +1425,6 @@ def lsrestore(self, enginename: str = "", filename: str = "", **kwargs):
14271425
14281426
Restores a previously dumped Linear Solver (see the :ref:`lsdump` command). This Linear Solver can
14291427
be used to solve a linear system using the :ref:`lsbac` command.
1430-
1431-
14321428
"""
14331429
command = f"*LSRESTORE,{enginename},{filename}"
14341430
return self.run(command, **kwargs)

src/ansys/mapdl/core/_commands/apdl/parameter_definition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2944,7 +2944,6 @@ def get(
29442944
* - STAT
29452945
- ``Element Number``
29462946
- Status of the element: 0 = uncracked, 1 = cracked
2947-
29482947
"""
29492948
command = f"*GET,{par},{entity},{entnum},{item1},{it1num},{item2},{it2num}"
29502949
return self.run(command, **kwargs)
@@ -4766,7 +4765,6 @@ def starvget(
47664765
* - EMF
47674766
-
47684767
- Electromotive force drop
4769-
47704768
"""
47714769
command = (
47724770
f"*VGET,{parr},{entity},{entnum},{item1},{it1num},{item2},{it2num},{kloop}"

src/ansys/mapdl/core/_commands/database/components.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ def cmwrite(self, fname: str = "", ext: str = "", fmat: str = "", **kwargs):
511511
* ``BLOCKED`` - Blocked format. This format allows faster reading of the file.
512512
513513
* ``UNBLOCKED`` - Unblocked format.
514-
515514
"""
516515
command = f"CMWRITE,{fname},{ext},,,{fmat}"
517516
return self.run(command, **kwargs)

src/ansys/mapdl/core/_commands/database/selecting.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ def asel(
240240
* - ACCA
241241
-
242242
- Concatenated areas (selects only areas that were created by area concatenation ( :ref:`accat` )).
243-
244243
"""
245244
command = f"ASEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
246245
return self.run(command, **kwargs)
@@ -652,7 +651,6 @@ def esel(
652651
* - ETAB
653652
- ``Lab``
654653
- Any user-defined element table label ( :ref:`etable` ).
655-
656654
"""
657655
command = f"ESEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kabs}"
658656
return self.run(command, **kwargs)
@@ -935,7 +933,6 @@ def ksel(
935933
* - ESYS
936934
-
937935
- Element coordinate system associated with the keypoint.
938-
939936
"""
940937
command = f"KSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kabs}"
941938
return self.run(command, **kwargs)
@@ -1166,7 +1163,6 @@ def lsel(
11661163
* - LCCA
11671164
-
11681165
- Concatenated lines (selects only lines that were created by concatenation ( :ref:`lccat` )).
1169-
11701166
"""
11711167
command = f"LSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
11721168
return self.run(command, **kwargs)
@@ -2056,7 +2052,6 @@ def vsel(
20562052
* - ESYS
20572053
-
20582054
- Element coordinate system associated with the volume.
2059-
20602055
"""
20612056
command = f"VSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
20622057
return self.run(command, **kwargs)

src/ansys/mapdl/core/_commands/graphics/set_up.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,6 @@ def jpeg(self, kywrd: str = "", opt: str = "", **kwargs):
10001000
10011001
* ``1,0`` - If ``Kywrd`` = TMOD, the values 1 and 0 determine whether bitmap (1) or stroke text (0)
10021002
fonts will be used
1003-
10041003
"""
10051004
command = f"JPEG,{kywrd},{opt}"
10061005
return self.run(command, **kwargs)
@@ -1192,7 +1191,6 @@ def pngr(self, kywrd: str = "", opt: str = "", val: int | str = "", **kwargs):
11921191
11931192
* ``1-9`` - Use this value to specify a specific compression level. 1 is the lowest compression
11941193
level (fastest) and 9 is the highest compression level (slowest).
1195-
11961194
"""
11971195
command = f"PNGR,{kywrd},{opt},{val}"
11981196
return self.run(command, **kwargs)
@@ -1494,7 +1492,6 @@ def tiff(self, kywrd: str = "", opt: str = "", **kwargs):
14941492
14951493
* ``1, 0`` - If ``Kywrd`` = TMOD, the values 1 and 0 determine whether bitmap (1) or stroke text (0)
14961494
fonts will be used
1497-
14981495
"""
14991496
command = f"TIFF,{kywrd},{opt}"
15001497
return self.run(command, **kwargs)

src/ansys/mapdl/core/_commands/hidden.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
"""These commands may be run by PyMAPDL, but are not supported from a
2424
user-context.
25-
2625
"""
2726

2827

src/ansys/mapdl/core/_commands/inq_func.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
22-
2322
"""Inquire undocumented functions"""
2423

2524

@@ -374,7 +373,6 @@ def lsinqr(self, line, key, pname="__tmpvar__", **kwargs):
374373
375374
For key not equal to 1 returned data is based
376375
on setting of key.
377-
378376
"""
379377
return self.run(f"{pname} = lsinqr({line}, {key})", **kwargs)
380378

@@ -580,7 +578,6 @@ def rlinqr(self, nreal, key, pname="__tmpvar__", **kwargs):
580578
-------
581579
int or str
582580
The returned value of ``rlinqr`` is based on setting of key.
583-
584581
"""
585582
return self.run(f"{pname} = rlinqr({nreal}, {key})", **kwargs)
586583

@@ -762,7 +759,6 @@ def cpinqr(self, ncp, key, pname="__tmpvar__", **kwargs):
762759
-------
763760
int or str
764761
The returned value of ``cpinqr`` is based on setting of key.
765-
766762
"""
767763
return self.run(f"{pname} = cpinqr({ncp}, {key})", **kwargs)
768764

@@ -1053,7 +1049,6 @@ def mpinqr(self, mat, iprop, key, pname="__tmpvar__", **kwargs):
10531049
+----------+-----+----------+-----+----------+-----+----------+-----+----------+-----+----------+-----+
10541050
10551051
see :meth:`TB <ansys.mapdl.core.Mapdl.tb>` command for more information.
1056-
10571052
"""
10581053
return self.run(f"{pname} = mpinqr({mat}, {iprop}, {key})", **kwargs)
10591054

@@ -1350,7 +1345,6 @@ def erinqr(self, key, pname="__tmpvar__", **kwargs):
13501345
-------
13511346
int or str
13521347
Value corresponding to key.
1353-
13541348
"""
13551349
return self.run(f"{pname} = erinqr({key})", **kwargs)
13561350

@@ -1423,6 +1417,5 @@ def wrinqr(self, key, pname="__tmpvar__", **kwargs):
14231417
-------
14241418
int or str
14251419
The value corresponding to key.
1426-
14271420
"""
14281421
return self.run(f"{pname} = wrinqr({key})", **kwargs)

0 commit comments

Comments
 (0)