You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed:
- `sey_key` and `get_key` have now verbose parameter. Default verbose was True for `get_key`, so `sey_key` and `get_key` have True by default.
- `sey_key` use `with_warn_for_invalid_lines` so I added a verbose parameter to it which is by default True.
- `parse` was also using `with_warn_for_invalid_lines`, it will by default be using `self.verbose`
Resolve#467
The function `with_warn_for_invalid_lines` iterates over a collection of `Binding` objects and
27
+
yields each object, while also logging a warning message if the object has an error and the
28
+
`verbose` flag is set to `True`.
29
+
30
+
Parameters:
31
+
mappings: An iterator of `Binding` objects. Each `Binding` object represents a line in a file being parsed. It contains information about the line number, the original line content, and any parsing errors encountered
32
+
verbose: Whether or not to display warnings for invalid lines. If set to True, warnings will be displayed. If set to False, warnings will be suppressed, defaults to True
33
+
Returns:
34
+
Iterator[Binding]: An iterator of `Binding` objects, each representing a line in a file being parsed
35
+
"""
25
36
formappinginmappings:
26
-
ifmapping.error:
37
+
ifmapping.errorandverbose:
27
38
logger.warning(
28
39
"Python-dotenv could not parse statement starting at line %s",
0 commit comments