FileReader #5
@@ -74,8 +74,10 @@ class FileDatasource:
|
||||
self._acc_reader = csv.reader(self._acc_f, skipinitialspace=True)
|
||||
self._gps_reader = csv.reader(self._gps_f, skipinitialspace=True)
|
||||
|
|
||||
|
||||
self._rewind_acc()
|
||||
self._rewind_gps()
|
||||
# File pointer is already at 0 right after open(), so no need to rewind here.
|
||||
# Skip header row once.
|
||||
|
if you open file, your read pointer is already 0, why to set it to 0 again? if you open file, your read pointer is already 0, why to set it to 0 again?
I removed the unnecessary rewind from _open_files(). I removed the unnecessary rewind from _open_files().
|
||||
next(self._acc_reader, None)
|
||||
next(self._gps_reader, None)
|
||||
|
||||
def _close_files(self) -> None:
|
||||
for f in (self._acc_f, self._gps_f):
|
||||
|
||||
Reference in New Issue
Block a user
You just can not return this variable from _detect_header_and_buffer() if it is not used
removed unnecessary variables from _detect_header_and_buffer() and fixed the _rewind_acc() and _rewind_gps() methods