Closed femtotrader closed 1 year ago
https://github.com/blankly-finance/blankly/blob/41f5294d3bad3937a887355530afb450df87de85/blankly/data/data_reader.py#L269
is not a very "clean" way of getting file extension.
maybe you should consider using pathlib
https://docs.python.org/3/library/pathlib.html and .suffixes attribute
.suffixes
an older way of doing may be to use os.path.splitext
os.path.splitext
Oh yeah probably would be better - happy to accept a contribution.
cleaning up the exception would also be nice to do something like assert <condition>, "The file path did not have a csv ending..."
assert <condition>, "The file path did not have a csv ending..."
https://github.com/blankly-finance/blankly/blob/41f5294d3bad3937a887355530afb450df87de85/blankly/data/data_reader.py#L269
is not a very "clean" way of getting file extension.
maybe you should consider using pathlib
https://docs.python.org/3/library/pathlib.html and
.suffixes
attributean older way of doing may be to use
os.path.splitext