Skip to content

Commit ad7cbcd

Browse files
authored
Merge pull request #96 from Pyhass/github-fixes
GitHub fixes
2 parents 69770e1 + b2ee9de commit ad7cbcd

32 files changed

+61
-28
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
CACHE_VERSION: 1
13-
DEFAULT_PYTHON: 3.8
13+
DEFAULT_PYTHON: "3.10"
1414
PRE_COMMIT_HOME: ~/.cache/pre-commit
1515

1616
jobs:
@@ -44,6 +44,7 @@ jobs:
4444
- name: Create Python virtual environment
4545
if: steps.cache-venv.outputs.cache-hit != 'true'
4646
run: |
47+
sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev python3-dev build-essential
4748
python -m venv venv
4849
. venv/bin/activate
4950
pip install -U "pip<20.3" setuptools

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# NOTE: put your own distribution build steps here.
3232
python -m pip install build
3333
python -m build
34-
34+
3535
- name: Upload wheel to GitHub Release
3636
uses: ncipollo/release-action@v1
3737
with:

.pre-commit-config.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.34.0
3+
rev: v3.20.0
44
hooks:
55
- id: pyupgrade
66
args: [--py38-plus]
77
- repo: https://github.com/psf/black
8-
rev: 22.3.0
8+
rev: 25.1.0
99
hooks:
1010
- id: black
1111
args:
1212
- --safe
1313
- --quiet
1414
- repo: https://github.com/codespell-project/codespell
15-
rev: v2.1.0
15+
rev: v2.4.1
1616
hooks:
1717
- id: codespell
1818
args:
@@ -21,36 +21,38 @@ repos:
2121
- --quiet-level=2
2222
exclude_types: [csv, json]
2323
- repo: https://github.com/pycqa/flake8
24-
rev: 3.9.2
24+
rev: 7.3.0
2525
hooks:
2626
- id: flake8
2727
additional_dependencies:
28-
- flake8-docstrings==1.5.0
29-
- pydocstyle==5.1.1
28+
- flake8-docstrings==1.7.0
29+
- pydocstyle==6.3.0
3030
- repo: https://github.com/PyCQA/bandit
31-
rev: 1.7.4
31+
rev: 1.8.6
3232
hooks:
3333
- id: bandit
3434
args:
3535
- --quiet
3636
- --format=custom
3737
- --configfile=tests/bandit.yaml
38+
additional_dependencies:
39+
- pbr
3840
- repo: https://github.com/PyCQA/isort
39-
rev: 5.12.0
41+
rev: 6.0.1
4042
hooks:
4143
- id: isort
4244
args: ["--profile", "black"]
4345
- repo: https://github.com/adrienverge/yamllint.git
44-
rev: v1.26.3
46+
rev: v1.37.1
4547
hooks:
4648
- id: yamllint
4749
- repo: https://github.com/pre-commit/mirrors-prettier
48-
rev: v2.7.1
50+
rev: v4.0.0-alpha.8
4951
hooks:
5052
- id: prettier
5153
stages: [manual]
5254
- repo: https://github.com/pre-commit/pre-commit-hooks
53-
rev: v4.3.0
55+
rev: v6.0.0
5456
hooks:
5557
- id: check-executables-have-shebangs
5658
stages: [manual]
@@ -66,8 +68,7 @@ repos:
6668
entry: pylint
6769
language: system
6870
types: [python]
69-
args:
70-
[
71-
"-rn", # Only display messages
72-
"-sn", # Don't display the score
73-
]
71+
args: [
72+
"-rn", # Only display messages
73+
"-sn", # Don't display the score
74+
]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![CodeQL](https://github.com/Pyhive/Pyhiveapi/workflows/CodeQL/badge.svg) ![Python Linting](https://github.com/Pyhive/Pyhiveapi/workflows/Python%20package/badge.svg)
33

44
# Introduction
5-
This is a library which intefaces with the Hive smart home platform.
5+
This is a library which interfaces with the Hive smart home platform.
66
This library is built mainly to integrate with the Home Assistant platform,
77
but it can also be used independently (See examples below.)
88

pyhiveapi/apyhiveapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""__init__.py."""
2+
23
# pylint: skip-file
34
if __name__ == "pyhiveapi":
45
from .api.hive_api import HiveApi as API # noqa: F401

pyhiveapi/apyhiveapi/action.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Hive Action Module."""
2+
23
# pylint: skip-file
34

45

pyhiveapi/apyhiveapi/alarm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Hive Alarm Module."""
2+
23
# pylint: skip-file
34

45

pyhiveapi/apyhiveapi/api/hive_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Hive API Module."""
2+
23
# pylint: skip-file
34
import json
45

pyhiveapi/apyhiveapi/api/hive_async_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Hive API Module."""
2+
23
# pylint: skip-file
34
import json
45
from typing import Optional
@@ -339,7 +340,7 @@ async def setAction(self, n_id, data):
339340
return self.json_return
340341

341342
async def error(self):
342-
"""An error has occurred iteracting with the Hive API."""
343+
"""An error has occurred interacting with the Hive API."""
343344
raise web_exceptions.HTTPError
344345

345346
async def isFileBeingUsed(self):

pyhiveapi/apyhiveapi/api/hive_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class HiveAuth:
7070
SMS_MFA_CHALLENGE = "SMS_MFA"
7171
DEVICE_VERIFIER_CHALLENGE = "DEVICE_SRP_AUTH"
7272

73-
def __init__(
73+
def __init__( # pylint: disable=too-many-positional-arguments
7474
self,
7575
username: str,
7676
password: str,
@@ -227,7 +227,7 @@ def generate_hash_device(self, device_group_key, device_key):
227227
}
228228
return device_password, device_secret_verifier_config
229229

230-
def get_device_authentication_key(
230+
def get_device_authentication_key( # pylint: disable=too-many-positional-arguments
231231
self, device_group_key, device_key, device_password, server_b_value, salt
232232
):
233233
"""Get the device authentication key."""

0 commit comments

Comments
 (0)