Fix lint, upgrade pylint to 1.8.1
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
'''
|
"""Generates constants for use in blinkpy."""
|
||||||
constants.py
|
|
||||||
Generates constants for use in blinkpy
|
|
||||||
'''
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
MAJOR_VERSION = 0
|
MAJOR_VERSION = 0
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
|
"""Module to define error types."""
|
||||||
|
|
||||||
USERNAME = (0, "Username must be a string")
|
USERNAME = (0, "Username must be a string")
|
||||||
PASSWORD = (1, "Password must be a string")
|
PASSWORD = (1, "Password must be a string")
|
||||||
AUTHENTICATE = (2, "Cannot authenticate since either password or username has not been set")
|
AUTHENTICATE = (
|
||||||
AUTH_TOKEN = (3, "Authentication header incorrect. Are you sure you logged in and received your token?")
|
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)")
|
REQUEST = (4, "Cannot perform request (get/post type incorrect)")
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
flake8==3.3
|
flake8==3.3
|
||||||
flake8-docstrings==1.1.0
|
flake8-docstrings==1.1.0
|
||||||
pylint==1.7.2
|
pylint==1.8.1
|
||||||
pydocstyle==2.0.0
|
pydocstyle==2.0.0
|
||||||
pytest>=2.9.2
|
pytest>=2.9.2
|
||||||
pytest-cov>=2.3.1
|
pytest-cov>=2.3.1
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ any communication related errors at startup.
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
from blinkpy import blinkpy as blinkpy
|
from blinkpy import blinkpy as blinkpy
|
||||||
import tests.mock_responses as mresp
|
|
||||||
import blinkpy.helpers.constants as const
|
import blinkpy.helpers.constants as const
|
||||||
|
import tests.mock_responses as mresp
|
||||||
|
|
||||||
USERNAME = 'foobar'
|
USERNAME = 'foobar'
|
||||||
PASSWORD = 'deadbeef'
|
PASSWORD = 'deadbeef'
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ deps =
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
ignore_errors = True
|
ignore_errors = True
|
||||||
commands =
|
commands =
|
||||||
pylint --rcfile={toxinidir}/pylintrc blinkpy.py tests
|
pylint --rcfile={toxinidir}/pylintrc blinkpy tests
|
||||||
flake8 blinkpy.py tests
|
flake8 blinkpy tests
|
||||||
pydocstyle blinkpy.py tests
|
pydocstyle blinkpy tests
|
||||||
rst-lint README.rst
|
rst-lint README.rst
|
||||||
rst-lint CHANGES.rst
|
rst-lint CHANGES.rst
|
||||||
|
|
||||||
@@ -38,4 +38,4 @@ commands =
|
|||||||
/bin/rm -rf build dist
|
/bin/rm -rf build dist
|
||||||
python setup.py bdist_wheel
|
python setup.py bdist_wheel
|
||||||
/bin/sh -c "pip install --upgrade dist/*.whl"
|
/bin/sh -c "pip install --upgrade dist/*.whl"
|
||||||
py.test tests
|
py.test tests
|
||||||
|
|||||||
Reference in New Issue
Block a user