From 02c4b2e7e10bb1f023b33b59c1bac917459e3d8a Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Thu, 28 May 2020 18:59:37 +0000 Subject: [PATCH 1/3] Add rst linter to pre-commit and fix flake8 --- .pre-commit-config.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..5f3a324b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +repos: + - repo: https://github.com/psf/black + rev: 19.10b0 + hooks: + - id: black + args: + - --safe + - --quiet + files: ^((blinkpy|tests)/.+)?[^/]+\.py$ + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.2 + hooks: + - id: flake8 + additional_dependencies: + - flake8-docstrings==1.5.0 + - pydocstyle==5.0.2 + files: ^(blinkpy|tests)/.+\.py$ + - repo: https://github.com/Lucas-C/pre-commit-hooks-markup + rev: v1.0.0 + hooks: + - id: rst-linter + files: /.+\.rst$ From d393c861d744c890f38cbf02d4f6a384aeb7a937 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Sat, 11 Jul 2020 14:36:37 +0000 Subject: [PATCH 2/3] bugfix: remove host from auth header --- blinkpy/blinkpy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blinkpy/blinkpy.py b/blinkpy/blinkpy.py index 48091140..21a711c1 100644 --- a/blinkpy/blinkpy.py +++ b/blinkpy/blinkpy.py @@ -184,7 +184,7 @@ def setup_params(self, response): ((self.region_id, self.region),) = response["region"].items() self._host = "{}.{}".format(self.region_id, BLINK_URL) self._token = response["authtoken"]["authtoken"] - self._auth_header = {"Host": self._host, "TOKEN_AUTH": self._token} + self._auth_header = {"TOKEN_AUTH": self._token} self.urls = BlinkURLHandler(self.region_id, legacy=self.legacy) self.networks = self.get_networks() self.client_id = response["client"]["id"] From 151d9b737569d1809ff52d6e84deeda6273762d9 Mon Sep 17 00:00:00 2001 From: Kevin Fronczak Date: Sat, 11 Jul 2020 14:37:04 +0000 Subject: [PATCH 3/3] Version bump --- blinkpy/helpers/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blinkpy/helpers/constants.py b/blinkpy/helpers/constants.py index c067f31f..36ffad62 100644 --- a/blinkpy/helpers/constants.py +++ b/blinkpy/helpers/constants.py @@ -4,7 +4,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 15 -PATCH_VERSION = 0 +PATCH_VERSION = 1 __version__ = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)