From ff1ae2f4032287a1fd8ecb2f6abf4d4821cc7a7d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 9 Jun 2024 13:39:37 -0500 Subject: [PATCH 1/4] fix: readme updates --- README.md | 6 +++++- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d4bb06a..fc7dcc44 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,10 @@ Install this via pip (or your favorite package manager): `pip install uiprotect` +## History + +This project was split off from the pyunifiprotect because that project changed the license to one which would not be accepted in Home Assistant. This project is committed to keeping the MIT license. + ## Credits - Bjarne Riis ([@briis](https://github.com/briis/)) for the original pyunifiprotect package @@ -94,7 +98,7 @@ If you want to install `uiprotect` natively, the below are the requirements: - [UniFi Protect](https://ui.com/camera-security) version 1.20+ - Latest version of library is generally only tested against the two latest minor version. This is either two latest stable versions (such as 1.21.x and 2.0.x) or the latest EA version and stable version (such as 2.2.x EA and 2.1.x). -- [Python](https://www.python.org/) 3.9+ +- [Python](https://www.python.org/) 3.10+ - POSIX compatible system - Library is only test on Linux, specifically the latest Debian version available for the official Python Docker images, but there is no reason the library should not work on any Linux distro or MacOS. - [ffmpeg](https://ffmpeg.org/) diff --git a/pyproject.toml b/pyproject.toml index a91472d1..173e5845 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,7 @@ exclude_lines = [ ] [tool.ruff] -target-version = "py38" +target-version = "py310" line-length = 88 [tool.ruff.lint] From 5cf2637a10458243161f42096c7a2049ddb3ad8f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 9 Jun 2024 18:39:59 +0000 Subject: [PATCH 2/4] chore(pre-commit.ci): auto fixes --- src/uiprotect/data/nvr.py | 2 +- src/uiprotect/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uiprotect/data/nvr.py b/src/uiprotect/data/nvr.py index 9683e0ca..5dd7bdc5 100644 --- a/src/uiprotect/data/nvr.py +++ b/src/uiprotect/data/nvr.py @@ -4,6 +4,7 @@ import asyncio import logging +import zoneinfo from datetime import datetime, timedelta, tzinfo from functools import cache from ipaddress import IPv4Address, IPv6Address @@ -13,7 +14,6 @@ import aiofiles import orjson -import zoneinfo from aiofiles import os as aos from pydantic.v1.fields import PrivateAttr diff --git a/src/uiprotect/utils.py b/src/uiprotect/utils.py index 9ed70d47..165f26fe 100644 --- a/src/uiprotect/utils.py +++ b/src/uiprotect/utils.py @@ -10,6 +10,7 @@ import socket import sys import time +import zoneinfo from collections import Counter from collections.abc import Callable, Coroutine, Iterable from copy import deepcopy @@ -26,7 +27,6 @@ from uuid import UUID import jwt -import zoneinfo from aiohttp import ClientResponse from pydantic.v1.fields import SHAPE_DICT, SHAPE_LIST, SHAPE_SET, ModelField from pydantic.v1.utils import to_camel From a124d17e848c54120aaafa93425f3ecfcd641dd4 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 9 Jun 2024 13:40:24 -0500 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc7dcc44..68fd8dca 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Install this via pip (or your favorite package manager): ## History -This project was split off from the pyunifiprotect because that project changed the license to one which would not be accepted in Home Assistant. This project is committed to keeping the MIT license. +This project was split off from `pyunifiprotect` because that project changed its license to one that would not be accepted in Home Assistant. This project is committed to keeping the MIT license. ## Credits From 7471ca8d38b51a3c1c36c240683bb91aa4edd790 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 9 Jun 2024 13:42:55 -0500 Subject: [PATCH 4/4] fix: remove useless rule --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 173e5845..b35a46ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -136,6 +136,7 @@ ignore = [ "S110", # `try`-`except`-`pass` detected, consider logging the exception "D106", # Missing docstring in public nested class "UP007", # typer needs Optional syntax + "UP038", # Use `X | Y` in `isinstance` is slower ] select = [ "B", # flake8-bugbear