docs: community docstring updates (#21040)

Added missed docstrings. Updated docstrings to consistent format.
This commit is contained in:
Leonid Ganeline
2024-04-29 14:40:23 -07:00
committed by GitHub
parent 90f19028e5
commit 85094cbb3a
29 changed files with 84 additions and 35 deletions

View File

@@ -65,7 +65,7 @@ def _flatten_dict(
def flatten_dict(
nested_dict: Dict[str, Any], parent_key: str = "", sep: str = "_"
) -> Dict[str, Any]:
"""Flattens a nested dictionary into a flat dictionary.
"""Flatten a nested dictionary into a flat dictionary.
Parameters:
nested_dict (dict): The nested dictionary to flatten.
@@ -108,7 +108,7 @@ def load_json(json_path: Union[str, Path]) -> str:
class BaseMetadataCallbackHandler:
"""This class handles the metadata and associated function states for callbacks.
"""Handle the metadata and associated function states for callbacks.
Attributes:
step (int): The current step.