Compare commits

..
5 Commits
Author SHA1 Message Date
Kevin FronczakandGitHub 37350da1b2 Merge pull request #402 from fronzbot/dev
0.16.4
2020-11-22 23:33:15 -05:00
Kevin FronczakandGitHub 19b7eef123 Merge pull request #363 from fronzbot/dev
0.16.3
2020-08-01 23:33:38 -04:00
Kevin FronczakandGitHub 6bd8d14190 Merge pull request #359 from fronzbot/dev
0.16.2
2020-08-01 23:12:25 -04:00
Kevin FronczakandGitHub f6ddfbe5cf Merge pull request #349 from fronzbot/dev
0.16.1
2020-07-29 11:32:04 -04:00
Kevin FronczakandGitHub 1b66eddfb4 Merge pull request #340 from fronzbot/dev
0.16.0
2020-07-20 23:01:30 -04:00
8 changed files with 39 additions and 27 deletions
+2 -3
View File
@@ -1,5 +1,5 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
@@ -8,8 +8,7 @@ daysUntilClose: 7
exemptLabels:
- Priority
- bug
- help wanted
- feature request
- Help Wanted
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
+2 -2
View File
@@ -10,11 +10,11 @@ jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
max-parallel: 3
matrix:
platform:
- ubuntu-latest
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
+25
View File
@@ -0,0 +1,25 @@
image: python
stages:
- test
before_script:
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- pip install tox
python35:
image: python:3.5
stage: test
script: tox -e py35
python36:
image: python:3.6
stage: test
script: tox -e py36
lint:
image: python:3.6
stage: test
script: tox -e lint
+1 -8
View File
@@ -58,11 +58,7 @@ class Auth:
"""Return authorization header."""
if self.token is None:
return None
return {
"TOKEN_AUTH": self.token,
"user-agent": DEFAULT_USER_AGENT,
"content-type": "application/json",
}
return {"TOKEN_AUTH": self.token, "user-agent": DEFAULT_USER_AGENT}
def create_session(self, opts=None):
"""Create a session for blink communication."""
@@ -231,9 +227,6 @@ class Auth:
try:
json_resp = response.json()
blink.available = json_resp["valid"]
if not json_resp["valid"]:
_LOGGER.error(f"{json_resp['message']}")
return False
except (KeyError, TypeError):
_LOGGER.error("Did not receive valid response from server.")
return False
+1 -2
View File
@@ -4,7 +4,7 @@ import os
MAJOR_VERSION = 0
MINOR_VERSION = 16
PATCH_VERSION = "5.rc0"
PATCH_VERSION = 4
__version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}.{PATCH_VERSION}"
@@ -34,7 +34,6 @@ PROJECT_CLASSIFIERS = [
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Home Automation",
]
+6 -6
View File
@@ -1,14 +1,14 @@
black==19.10b0
coverage==5.4
coverage==5.3
flake8==3.8.4
flake8-docstrings==1.5.0
pre-commit==2.9.3
pre-commit==2.7.1
pylint==2.6.0
pydocstyle==5.1.1
pytest==6.2.2
pytest-cov==2.11.1
pytest==6.1.1
pytest-cov==2.10.1
pytest-sugar==0.9.4
pytest-timeout==1.4.2
restructuredtext-lint==1.3.2
pygments==2.7.4
restructuredtext-lint==1.3.1
pygments==2.7.1
testtools>=2.4.0
+1 -5
View File
@@ -128,11 +128,7 @@ class TestAuth(unittest.TestCase):
def test_header(self):
"""Test header data."""
self.auth.token = "bar"
expected_header = {
"TOKEN_AUTH": "bar",
"user-agent": const.DEFAULT_USER_AGENT,
"content-type": "application/json",
}
expected_header = {"TOKEN_AUTH": "bar", "user-agent": const.DEFAULT_USER_AGENT}
self.assertDictEqual(self.auth.header, expected_header)
def test_header_no_token(self):