mirror of
https://github.com/bckelley/tconnectsync.git
synced 2026-08-24 03:34:12 -05:00
fix flake8
This commit is contained in:
@@ -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'"
|
||||||
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user