fix flake8

This commit is contained in:
James Woglom
2024-12-12 00:27:35 -05:00
parent 1ed3d35965
commit 00023c6aba
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -27,3 +27,4 @@ typing-extensions = "*"
tconnectsync = "python3 main.py" tconnectsync = "python3 main.py"
test = "python3 -m unittest discover -vv" test = "python3 -m unittest discover -vv"
build_events = "bash -c 'cd tconnectsync/eventparser && python3 build_events.py > events.py'" build_events = "bash -c 'cd tconnectsync/eventparser && python3 build_events.py > events.py'"
lint = "bash -c 'flake8 . --count --select=E9,F63,F7,F82 && flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 && echo PASS'"
+1 -1
View File
@@ -173,7 +173,7 @@ class NightscoutApi:
if ret is None and (time_start or time_end): if ret is None and (time_start or time_end):
ret = internal(True) ret = internal(True)
if ret is not None: if ret is not None:
logger.warning("devicestatus with activityType=%s time_start=%s time_end=%s only returned data when timestamps contained a space" % (activityType, time_start, time_end)) logger.warning("devicestatus time_start=%s time_end=%s only returned data when timestamps contained a space" % (time_start, time_end))
return ret return ret
except requests.exceptions.ConnectionError as e: except requests.exceptions.ConnectionError as e:
if self.ignore_conn_errors: if self.ignore_conn_errors:
+1 -1
View File
@@ -50,7 +50,7 @@ class TandemSourceAutoupdate:
if pretend: if pretend:
logger.info('Would update now if not in pretend mode') logger.info('Would update now if not in pretend mode')
else: else:
added, event_seqnum = ProcessTimeRange(tconnect, nightscout, tconnectDevice, pretend, secret, features=features).process(time_start, time_end) added, event_seqnum = ProcessTimeRange(tconnect, nightscout, tconnectDevice, pretend, self.secret, features=features).process(time_start, time_end)
logger.info('Added %d items from ProcessTimeRange' % added) logger.info('Added %d items from ProcessTimeRange' % added)
self.last_successful_process_time_range = now self.last_successful_process_time_range = now