diff --git a/blinkpy/helpers/constants.py b/blinkpy/helpers/constants.py index 2a2d608..418a134 100644 --- a/blinkpy/helpers/constants.py +++ b/blinkpy/helpers/constants.py @@ -1,7 +1,5 @@ -''' -constants.py -Generates constants for use in blinkpy -''' +"""Generates constants for use in blinkpy.""" + import os MAJOR_VERSION = 0 diff --git a/blinkpy/helpers/errors.py b/blinkpy/helpers/errors.py index 725c683..a3b89b3 100644 --- a/blinkpy/helpers/errors.py +++ b/blinkpy/helpers/errors.py @@ -1,6 +1,13 @@ +"""Module to define error types.""" + USERNAME = (0, "Username must be a string") PASSWORD = (1, "Password must be a string") -AUTHENTICATE = (2, "Cannot authenticate since either password or username has not been set") -AUTH_TOKEN = (3, "Authentication header incorrect. Are you sure you logged in and received your token?") +AUTHENTICATE = ( + 2, + "Cannot authenticate since either password or username has not been set" +) +AUTH_TOKEN = ( + 3, + "Authentication header incorrect. Are you sure you received your token?" +) REQUEST = (4, "Cannot perform request (get/post type incorrect)") - \ No newline at end of file diff --git a/requirements_test.txt b/requirements_test.txt index 06fff4d..f0e1caf 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,6 @@ flake8==3.3 flake8-docstrings==1.1.0 -pylint==1.7.2 +pylint==1.8.1 pydocstyle==2.0.0 pytest>=2.9.2 pytest-cov>=2.3.1 diff --git a/tests/test_blink_system.py b/tests/test_blink_system.py index e4242e3..abd873e 100644 --- a/tests/test_blink_system.py +++ b/tests/test_blink_system.py @@ -9,8 +9,8 @@ any communication related errors at startup. import unittest from unittest import mock from blinkpy import blinkpy as blinkpy -import tests.mock_responses as mresp import blinkpy.helpers.constants as const +import tests.mock_responses as mresp USERNAME = 'foobar' PASSWORD = 'deadbeef' diff --git a/tox.ini b/tox.ini index 032b19d..849b66c 100644 --- a/tox.ini +++ b/tox.ini @@ -20,9 +20,9 @@ deps = basepython = python3 ignore_errors = True commands = - pylint --rcfile={toxinidir}/pylintrc blinkpy.py tests - flake8 blinkpy.py tests - pydocstyle blinkpy.py tests + pylint --rcfile={toxinidir}/pylintrc blinkpy tests + flake8 blinkpy tests + pydocstyle blinkpy tests rst-lint README.rst rst-lint CHANGES.rst @@ -38,4 +38,4 @@ commands = /bin/rm -rf build dist python setup.py bdist_wheel /bin/sh -c "pip install --upgrade dist/*.whl" - py.test tests \ No newline at end of file + py.test tests