Skip to content

Commit

Permalink
📝 Use "-" instead of "*" for bullet point lists
Browse files Browse the repository at this point in the history
  • Loading branch information
valentingol committed Jan 8, 2024
1 parent 65fca6c commit 221c220
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
26 changes: 13 additions & 13 deletions cliconfig/dict_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
--------
Expand Down Expand Up @@ -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:
Expand Down
58 changes: 29 additions & 29 deletions cliconfig/processing/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 221c220

Please sign in to comment.