Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilo59 committed Jan 27, 2023
1 parent 6ecb83e commit 2270c96
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions great_expectations/render/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ def substitute_none_for_missing(
Returns:
A copy of the original `kwargs` with missing keys from `kwarg_list` defaulted to `None`.
Example::
>>> result = substitute_none_for_missing(
... kwargs={"a":1, "b":2},
... kwarg_list=["c", "d"]
... )
... print(result)
{"a":1, "b":2, "c": None, "d": None}
```python
>>> result = substitute_none_for_missing(
... kwargs={"a":1, "b":2},
... kwarg_list=["c", "d"]
... )
... print(result)
{"a":1, "b":2, "c": None, "d": None}
```
This is helpful for standardizing the input objects for rendering functions.
The alternative is lots of awkward `if "some_param" not in kwargs or kwargs["some_param"] == None:` clauses in renderers.
Expand All @@ -172,13 +172,13 @@ def parse_row_condition_string_pandas_engine(
Returns:
A tuple containing the template string and a `dict` of parameters.
Example::
>>> template_str, params = parse_row_condition_string_pandas_engine("Age in [0, 42]")
>>> print(template_str)
"if $row_condition__0"
>>> params
{"row_condition__0": "Age in [0, 42]"}
```python
>>> template_str, params = parse_row_condition_string_pandas_engine("Age in [0, 42]")
>>> print(template_str)
"if $row_condition__0"
>>> params
{"row_condition__0": "Age in [0, 42]"}
```
"""
if len(condition_string) == 0:
Expand Down

0 comments on commit 2270c96

Please sign in to comment.