From 45cac25304c7a090ac8deff39d1527addc93bf58 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Tue, 15 Jul 2025 10:41:55 -0500 Subject: [PATCH 1/3] Change kwargs input from dict to any --- src/diffpy/morph/morphpy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diffpy/morph/morphpy.py b/src/diffpy/morph/morphpy.py index 974573fa..837885b9 100644 --- a/src/diffpy/morph/morphpy.py +++ b/src/diffpy/morph/morphpy.py @@ -100,7 +100,7 @@ def morph( plot: bool Show a plot of the morphed and target functions as well as the difference curve (default: False). - kwargs: dict + kwargs: Any See the diffpy.morph website for full list of options. Returns ------- @@ -155,7 +155,7 @@ def morph_arrays( plot: bool Show a plot of the morphed and target functions as well as the difference curve (default: False). - kwargs: dict + kwargs: Any See the diffpy.morph website for full list of options. Returns ------- From b914c8290c1613bae1f24c33aa2fd5c7e88cca69 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Tue, 15 Jul 2025 10:43:52 -0500 Subject: [PATCH 2/3] News --- news/kwargs.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/kwargs.rst diff --git a/news/kwargs.rst b/news/kwargs.rst new file mode 100644 index 00000000..052ffdab --- /dev/null +++ b/news/kwargs.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Docstring for kwargs updated from dict to Any since various input types from kwargs are possible (e.g. a list/tuple for squeeze, a tuple for funcy, a float for smear-pdf). This should remove the warning that inputs are not dicts. + +**Security:** + +* From 0c0ce8ae0aff3d833ddcdb5fa7db44acda894c38 Mon Sep 17 00:00:00 2001 From: Sparks29032 Date: Tue, 15 Jul 2025 10:46:07 -0500 Subject: [PATCH 3/3] Explicitly list --- src/diffpy/morph/morphpy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diffpy/morph/morphpy.py b/src/diffpy/morph/morphpy.py index 837885b9..80e792ff 100644 --- a/src/diffpy/morph/morphpy.py +++ b/src/diffpy/morph/morphpy.py @@ -100,7 +100,7 @@ def morph( plot: bool Show a plot of the morphed and target functions as well as the difference curve (default: False). - kwargs: Any + kwargs: str, float, list, tuple, bool See the diffpy.morph website for full list of options. Returns ------- @@ -155,7 +155,7 @@ def morph_arrays( plot: bool Show a plot of the morphed and target functions as well as the difference curve (default: False). - kwargs: Any + kwargs: str, float, list, tuple, bool See the diffpy.morph website for full list of options. Returns -------