diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..099ec59 --- /dev/null +++ b/app/__init__.py @@ -0,0 +1 @@ +"""Python init file for app.py.""" diff --git a/app/app.py b/app/app.py index f831dc6..eb7556e 100644 --- a/app/app.py +++ b/app/app.py @@ -1,4 +1,4 @@ -""" Script to run blinkpy as an app.""" +"""Script to run blinkpy as an app.""" from os import environ from datetime import datetime, timedelta from blinkpy import blinkpy @@ -10,14 +10,13 @@ TIMEDELTA = timedelta(environ.get('TIMEDELTA', 1)) def get_date(): - """Returns now - timedelta for blinkpy.""" + """Return now - timedelta for blinkpy.""" return (datetime.now() - TIMEDELTA).isoformat() def download_videos(blink, save_dir='/media'): - """Method to download videos.""" + """Make request to download videos.""" blink.download_videos(save_dir, since=get_date()) - return def start(): @@ -26,7 +25,7 @@ def start(): blink.start() return blink -if __name__ == '__main__': - blink = start() - download_videos(blink) +if __name__ == '__main__': + BLINK = start() + download_videos(BLINK) diff --git a/tox.ini b/tox.ini index ba88f15..3e9ccae 100644 --- a/tox.ini +++ b/tox.ini @@ -20,9 +20,9 @@ deps = basepython = python3 ignore_errors = True commands = - pylint --rcfile={toxinidir}/pylintrc blinkpy tests - flake8 blinkpy tests - pydocstyle blinkpy tests + pylint --rcfile={toxinidir}/pylintrc blinkpy tests app + flake8 blinkpy tests app + pydocstyle blinkpy tests app rst-lint README.rst rst-lint CHANGES.rst