Skip to content

Commit fb2b436

Browse files
Apply suggestions from code review
Co-authored-by: German <[email protected]>
1 parent 66bd53f commit fb2b436

File tree

1 file changed

+2
-6
lines changed
  • src/ansys/tools/visualization_interface/backends/pyvista

1 file changed

+2
-6
lines changed

src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,7 @@ def __extract_kwargs(self, func_name: Callable, input_kwargs: Dict[str, Any]) ->
428428
for k, v in signature.parameters.items():
429429
# We are ignoring positional arguments, and passing everything as kwarg
430430
if v.default is not inspect.Parameter.empty:
431-
kwargs[k] = v.default
432-
for k, v in kwargs.items():
433-
# my_args is the arguments passed to the ansys-visualization API
434-
if k in input_kwargs:
435-
kwargs[k] = input_kwargs[k]
431+
kwargs[k] = input_kwargs[k] if k in input_kwargs else v.default
436432
return kwargs
437433

438434
def show(
@@ -462,7 +458,7 @@ def show(
462458
dark_mode : bool, default: False
463459
Whether to use dark mode for the widgets.
464460
**kwargs : Any
465-
Additional keyword arguments for the show method.
461+
Additional keyword arguments for the show or plot method.
466462
467463
Returns
468464
-------

0 commit comments

Comments
 (0)