Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
#language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -158,4 +158,4 @@
]


# -- Extension configuration -------------------------------------------------
# -- Extension configuration -------------------------------------------------
2 changes: 1 addition & 1 deletion pyhap/accessory.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def setup_message(self):
)
else:
print(
"To use the QR Code feature, use 'pip install " "HAP-python[QRCode]'",
"To use the QR Code feature, use 'pip install HAP-python[QRCode]'",
flush=True,
)
print(
Expand Down
4 changes: 2 additions & 2 deletions pyhap/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ async def start_stream(self, session_info, stream_config):

return True

async def stop_stream(self, session_info): # pylint: disable=no-self-use
async def stop_stream(self, session_info):
"""Stop the stream for the given ``session_id``.

This method can be implemented if custom stop stream commands are needed. The
Expand Down Expand Up @@ -886,7 +886,7 @@ async def reconfigure_stream(self, session_info, stream_config):
"""
await self.start_stream(session_info, stream_config)

def get_snapshot(self, image_size): # pylint: disable=unused-argument, no-self-use
def get_snapshot(self, image_size): # pylint: disable=unused-argument
"""Return a jpeg of a snapshot from the camera.

Overwrite to implement getting snapshots from your camera.
Expand Down
2 changes: 1 addition & 1 deletion pyhap/hap_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import logging
import struct

from chacha20poly1305_reuseable import ChaCha20Poly1305Reusable as ChaCha20Poly1305
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
from cryptography.hazmat.primitives.kdf.hkdf import HKDF

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion pyhap/hap_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from cryptography.exceptions import InvalidSignature, InvalidTag
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import ed25519, x25519
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
from chacha20poly1305_reuseable import ChaCha20Poly1305Reusable as ChaCha20Poly1305

from pyhap import tlv
from pyhap.const import (
Expand Down
2 changes: 1 addition & 1 deletion pyhap/hap_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

logger = logging.getLogger(__name__)

HIGH_WRITE_BUFFER_SIZE = 2 ** 19
HIGH_WRITE_BUFFER_SIZE = 2**19
# We timeout idle connections after 90 hours as we must
# clean up unused sockets periodically. 90 hours was choosen
# as its the longest time we expect a user to be away from
Expand Down
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ disable=
too-many-public-methods,
too-many-return-statements,
too-many-statements,
bad-continuation,
unused-argument,
consider-using-with
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
README = f.read()


REQUIRES = ["cryptography", "zeroconf>=0.36.2", "h11"]
REQUIRES = ["cryptography", "chacha20poly1305-reuseable", "zeroconf>=0.36.2", "h11"]


setup(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def __init__(self):
def publish(self, data, client_addr=None, immediate=False):
pass

def add_job(self, target, *args): # pylint: disable=no-self-use
def add_job(self, target, *args):
asyncio.new_event_loop().run_until_complete(target(*args))
2 changes: 1 addition & 1 deletion tests/test_characteristic.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_repr():
char = get_char(PROPERTIES.copy())
del char.properties["Permissions"]
assert (
char.__repr__() == "<characteristic display_name=Test Char value=0 "
repr(char) == "<characteristic display_name=Test Char value=0 "
"properties={'Format': 'int'}>"
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_hap_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def decrypt(self):
self._crypt_in_buffer = bytearray() # Encrypted buffer
return decrypted

def encrypt(self, data): # pylint: disable=no-self-use
def encrypt(self, data):
"""Mock as plaintext."""
return data

Expand Down
4 changes: 1 addition & 3 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def test_repr():
"""Test service representation."""
service = Service(uuid1(), "TestService")
service.characteristics = [get_chars()[0]]
assert (
service.__repr__() == "<service display_name=TestService chars={'Char 1': 0}>"
)
assert repr(service) == "<service display_name=TestService chars={'Char 1': 0}>"


def test_add_characteristic():
Expand Down