Remove unnecessary rewind after file open
All checks were successful
Test Agent / test-agent-run (push) Successful in 18s

This commit is contained in:
Олександр Гуранець 2026-02-25 21:08:54 +02:00 committed by hasslesstech
parent eee4743d4d
commit dbd6e88de8
2 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ jobs:
runs-on: arch-x86_64
steps:
- name: Fetch the repository
run: git clone --branch ${{ gitea.ref_name }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
run: git clone --revision ${{ gitea.sha }} --depth 1 ${{ gitea.server_url }}/${{ gitea.repository }}
- name: Build containers
run: docker-compose -f docker-compose-test.yaml build

View File

@ -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.
next(self._acc_reader, None)
next(self._gps_reader, None)
def _close_files(self) -> None:
for f in (self._acc_f, self._gps_f):