Skip to content

Commit 20f469d

Browse files
nh13msto
andauthored
Apply suggestions from code review
Co-authored-by: Matt Stone <[email protected]>
1 parent 77c35a0 commit 20f469d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fgpyo/util/metric.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def _parsers(cls) -> Dict[type, Callable[[str], Any]]:
211211

212212
@classmethod
213213
def read(
214-
cls, path: Path, ignore_extra_fields: bool = True, strip_whitespace: bool = True
214+
cls, path: Path, ignore_extra_fields: bool = True, strip_whitespace: bool = False
215215
) -> Iterator[Any]:
216216
"""Reads in zero or more metrics from the given path.
217217
@@ -223,7 +223,7 @@ def read(
223223
Args:
224224
path: the path to the metrics file.
225225
ignore_extra_fields: True to ignore any extra columns, False to raise an exception.
226-
strip_whitespace: True to strip leading and trailing whitespace, False to keep as-is.
226+
strip_whitespace: True to strip leading and trailing whitespace from each field, False to keep as-is.
227227
"""
228228
parsers = cls._parsers()
229229
with io.to_reader(path) as reader:
@@ -358,7 +358,7 @@ def format_value(cls, value: Any) -> str: # noqa: C901
358358
+ "}"
359359
)
360360
elif isinstance(value, float):
361-
return f"{round(value, 5)}".strip()
361+
return f"{round(value, 5)}"
362362
elif value is None:
363363
return ""
364364
else:

0 commit comments

Comments
 (0)