From 221c2202548e54df020b8b5a490647d63eb70a46 Mon Sep 17 00:00:00 2001 From: valentingol Date: Mon, 8 Jan 2024 11:11:32 +0100 Subject: [PATCH] :memo: Use "-" instead of "*" for bullet point lists --- cliconfig/dict_routines.py | 26 +++++++-------- cliconfig/processing/builtin.py | 58 ++++++++++++++++----------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/cliconfig/dict_routines.py b/cliconfig/dict_routines.py index a4405c2..1dcda99 100644 --- a/cliconfig/dict_routines.py +++ b/cliconfig/dict_routines.py @@ -264,11 +264,11 @@ def clean_pre_flat(in_dict: Dict[str, Any], priority: str) -> Dict[str, Any]: Warns ----- - * No flat key can contain a dict. Then, dicts like `{'a.b': {'c': 1}}` + - No flat key can contain a dict. Then, dicts like `{'a.b': {'c': 1}}` are not supported. - * All the keys that contain dots (the flat keys) must be at the root. + - All the keys that contain dots (the flat keys) must be at the root. Then, dicts like `{a: {'b.c': 1}}` are not supported. - * To summarize, the dict must contain only fully flat dicts + - To summarize, the dict must contain only fully flat dicts and/or fully nested dicts. Examples @@ -332,12 +332,12 @@ def _del_key( Warns ----- - * No flat key can contain a dict. Then, dicts like `{'a.b': {'c': 1}}` - are not supported. - * All the keys that contain dots (the flat keys) must be at the root. - Then, dicts like `{a: {'b.c': 1}}` are not supported. - * To summarize, the dict must contain only fully flat dicts - and fully nested dicts. + - No flat key can contain a dict. Then, dicts like `{'a.b': {'c': 1}}` + are not supported. + - All the keys that contain dots (the flat keys) must be at the root. + Then, dicts like `{a: {'b.c': 1}}` are not supported. + - To summarize, the dict must contain only fully flat dicts + and fully nested dicts. Examples -------- @@ -428,10 +428,10 @@ def load_dict(path: str) -> Dict[str, Any]: Notes ----- - * If multiple yaml files are in the same document, they are merged - from the first to the last. - * To use multiple yaml tags, separate them with "@". E.g. `!tag1@tag2`. - * You can combine any number of yaml and cliconfig tags together. + - If multiple yaml files are in the same document, they are merged + from the first to the last. + - To use multiple yaml tags, separate them with "@". E.g. `!tag1@tag2`. + - You can combine any number of yaml and cliconfig tags together. """ try: with open(path, "r", encoding="utf-8") as cfg_file: diff --git a/cliconfig/processing/builtin.py b/cliconfig/processing/builtin.py index 600b295..d7dad73 100644 --- a/cliconfig/processing/builtin.py +++ b/cliconfig/processing/builtin.py @@ -197,12 +197,12 @@ class ProcessCopy(Processing): Notes ----- - * The copy key is protected against any modification and will raise an error - if you try to modify it but will be updated if the copied key is updated. - * If the key to copy does not exist in the config on post-merge, no error - is raised to let the user the possibility to add the key later via merge. - However, if the key still does not exist at the end of the build - (and the key was never copied), an error is raised. + - The copy key is protected against any modification and will raise an error + if you try to modify it but will be updated if the copied key is updated. + - If the key to copy does not exist in the config on post-merge, no error + is raised to let the user the possibility to add the key later via merge. + However, if the key still does not exist at the end of the build + (and the key was never copied), an error is raised. """ def __init__(self) -> None: @@ -332,12 +332,12 @@ class ProcessDef(Processing): Notes ----- - * Unlike @copy processing you can change the value by setting - an other value or an other definition with @def. - * Unlike copy processing all the keys used in expression - must be in the config at post-merge. - * This processing does not use `eval` and is therefore safe from - malicious code. + - Unlike @copy processing you can change the value by setting + an other value or an other definition with @def. + - Unlike copy processing all the keys used in expression + must be in the config at post-merge. + - This processing does not use `eval` and is therefore safe from + malicious code. """ def __init__(self) -> None: @@ -423,11 +423,11 @@ class ProcessTyping(Processing): Notes ----- - * The conversion into union type is from left to right. For instance, - `param@type:List[str|float]: [True]` is converted to `["True"]`. - * The type is not checked on pre-merge or post-merge to allow the parameter - to be updated (by a copy or a merge for instance). The goal of this - processing is to ensure the type at the end of the build. + - The conversion into union type is from left to right. For instance, + `param@type:List[str|float]: [True]` is converted to `["True"]`. + - The type is not checked on pre-merge or post-merge to allow the parameter + to be updated (by a copy or a merge for instance). The goal of this + processing is to ensure the type at the end of the build. Examples @@ -732,14 +732,14 @@ class ProcessNew(Processing): Notes ----- - * Tag a subconfig by adding `@new` at the end of the key containing - the sub-config dict in your yaml file. - * When a parameter is added with this processing, it is possible to modify it - later via config merge without the tag because the parameter is then present - in the current configuration. - * If the tagged parameter or sub-config is already present in the current - configuration, no error are raised and the value is still updated on - post-merge. It may no have influence in practice. + - Tag a subconfig by adding `@new` at the end of the key containing + the sub-config dict in your yaml file. + - When a parameter is added with this processing, it is possible to modify it + later via config merge without the tag because the parameter is then present + in the current configuration. + - If the tagged parameter or sub-config is already present in the current + configuration, no error are raised and the value is still updated on + post-merge. It may no have influence in practice. """ def __init__(self) -> None: @@ -823,10 +823,10 @@ class ProcessDict(Processing): Warns ----- - * Processings are not applied in the dict keys. In particular, - the tags are not used and not removed. - * The tag `@dict` must be added at the key containing - the dict every time you want to modify the dict. + - Processings are not applied in the dict keys. In particular, + the tags are not used and not removed. + - The tag `@dict` must be added at the key containing + the dict every time you want to modify the dict. """ class PseudoDict: