From ec713ad49507cc603d7811d7826ab29be00d91e5 Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:14:06 +0100 Subject: [PATCH] [docs][fixlib] Fix some typos in doc-strings (#2304) --- fixlib/fixlib/config.py | 2 +- fixlib/fixlib/tree.py | 2 +- fixlib/fixlib/utils.py | 2 +- fixlib/test/test_utils.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fixlib/fixlib/config.py b/fixlib/fixlib/config.py index eedaff2307..7cc0732116 100644 --- a/fixlib/fixlib/config.py +++ b/fixlib/fixlib/config.py @@ -157,7 +157,7 @@ def load_config(self, reload: bool = False) -> None: if reload and self.restart_required(new_config): restart() - # update the global config object with the confif from the core + # update the global config object with the config from the core Config.running_config.data = self.with_default_config(raw_config_json) # if the raw_config was not empty, we need to set the revision too if new_config_revision: diff --git a/fixlib/fixlib/tree.py b/fixlib/fixlib/tree.py index 3c17703440..f669ca8f6f 100644 --- a/fixlib/fixlib/tree.py +++ b/fixlib/fixlib/tree.py @@ -878,7 +878,7 @@ def update_node(self, nid, **attrs): cn = self[nid] for attr, val in attrs.items(): if attr == "identifier": - # Updating node id meets following contraints: + # Updating node id meets following constraints: # * Update node identifier property # * Update parent's followers # * Update children's parents diff --git a/fixlib/fixlib/utils.py b/fixlib/fixlib/utils.py index 3b93c0dc7f..33ce65775e 100644 --- a/fixlib/fixlib/utils.py +++ b/fixlib/fixlib/utils.py @@ -491,7 +491,7 @@ def merge_json_elements( merge_strategy: Callable[[JsonElement, JsonElement], JsonElement] = lambda existing_val, update_val: update_val, ) -> JsonElement: """ - Merges two JsonElements accorting to merge strategy. + Merges two JsonElements according to merge strategy. By default recursively traverses Dicts and prefers the new value """ if isinstance(existing, dict) and isinstance(update, dict): diff --git a/fixlib/test/test_utils.py b/fixlib/test/test_utils.py index 251de5689e..e544172a99 100644 --- a/fixlib/test/test_utils.py +++ b/fixlib/test/test_utils.py @@ -479,7 +479,7 @@ def test_freeze(): # nested too nested_dict = {"foo": flat_dict} assert freeze(nested_dict) == frozendict({"foo": frozendict(flat_dict)}) - # and a list to tupple + # and a list to tuple assert freeze([1, 2]) == (1, 2)