Open mathause opened 4 months ago
Format specifiers are not taken into account when creating names:
import filefinder f = filefinder.FileFinder( path_pattern="", file_pattern="domain_{domain:02d}.nc", ) domain = 1 print(f.create_full_name(domain=domain)) print(f"domain_{domain:02d}.nc")
domain_1.nc domain_01.nc
Because the _pattern_no_fmt_spec is used:
_pattern_no_fmt_spec
https://github.com/mathause/filefinder/blob/729c8eeddab6f37c989f5af3d2750f64b4638b65/filefinder/_filefinder.py#L52
In this case it would be good if the fmt spec was used. But does that hold in general?
There are specifier that parse can parse but that are not valid format options (e.g. "{char:l}". See
"{char:l}"
Format specifiers are not taken into account when creating names:
Because the
_pattern_no_fmt_spec
is used:https://github.com/mathause/filefinder/blob/729c8eeddab6f37c989f5af3d2750f64b4638b65/filefinder/_filefinder.py#L52
In this case it would be good if the fmt spec was used. But does that hold in general?