Skip to content

Commit

Permalink
Bump ruff from 0.2.2 to 0.3.0 (#759)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.2.2 to 0.3.0

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.2 to 0.3.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.2.2...v0.3.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Run hooks

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Bach <[email protected]>
  • Loading branch information
dependabot[bot] and bachya authored Mar 1, 2024
1 parent 54ad5cb commit 5e18656
Show file tree
Hide file tree
Showing 36 changed files with 63 additions and 29 deletions.
1 change: 1 addition & 0 deletions examples/test_client_by_auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test system functionality with an Auth0 code/verifier."""

import asyncio
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions examples/test_client_by_refresh_token.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test system functionality with an Auth0 code/verifier."""

import asyncio
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions examples/test_websocket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test system functionality with an Auth0 code/verifier."""

import asyncio
import logging
import os
Expand Down
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pytest-cov = "^4.0.0"
pyupgrade = "^3.1.0"
pyyaml = "^6.0.1"
requests = ">=2.31.0"
ruff = ">=0.0.261,<0.2.3"
ruff = ">=0.0.261,<0.3.1"
sphinx-rtd-theme = ">=1,<3"
typing-extensions = "^4.8.0"
vulture = "^2.6"
Expand Down
1 change: 1 addition & 0 deletions script/auth
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Initiate the SimpliSafe authorization process."""

import asyncio
import sys
import webbrowser
Expand Down
1 change: 1 addition & 0 deletions simplipy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Define the simplipy package."""

from simplipy.api import API # noqa
1 change: 1 addition & 0 deletions simplipy/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define functionality for interacting with the SimpliSafe API."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions simplipy/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define package constants."""

import logging

LOGGER = logging.getLogger(__package__)
Expand Down
1 change: 1 addition & 0 deletions simplipy/device/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a base SimpliSafe device."""

from __future__ import annotations

from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions simplipy/device/camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define SimpliSafe cameras (SimpliCams)."""

from __future__ import annotations

from enum import Enum
Expand Down
13 changes: 7 additions & 6 deletions simplipy/device/lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a SimpliSafe lock."""

from __future__ import annotations

from collections.abc import Awaitable, Callable
Expand Down Expand Up @@ -149,9 +150,9 @@ async def async_lock(self) -> None:
)

# Update the internal state representation:
self._system.sensor_data[self._serial]["status"][
"lockState"
] = self._InternalStates.LOCKED.value
self._system.sensor_data[self._serial]["status"]["lockState"] = (
self._InternalStates.LOCKED.value
)

async def async_unlock(self) -> None:
"""Unlock the lock."""
Expand All @@ -162,6 +163,6 @@ async def async_unlock(self) -> None:
)

# Update the internal state representation:
self._system.sensor_data[self._serial]["status"][
"lockState"
] = self._InternalStates.UNLOCKED.value
self._system.sensor_data[self._serial]["status"]["lockState"] = (
self._InternalStates.UNLOCKED.value
)
1 change: 1 addition & 0 deletions simplipy/device/sensor/v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a v2 (old) SimpliSafe sensor."""

from typing import cast

from simplipy.device import Device, DeviceTypes
Expand Down
1 change: 1 addition & 0 deletions simplipy/device/sensor/v3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a v3 (new) SimpliSafe sensor."""

from __future__ import annotations

from typing import Any, cast
Expand Down
1 change: 1 addition & 0 deletions simplipy/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define package errors."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions simplipy/system/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define V2 and V3 SimpliSafe systems."""

from __future__ import annotations

from collections.abc import Callable
Expand Down
1 change: 1 addition & 0 deletions simplipy/system/v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a V2 (original) SimpliSafe system."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions simplipy/system/v3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a V3 (new) SimpliSafe system."""

from __future__ import annotations

from datetime import datetime, timedelta
Expand Down
1 change: 1 addition & 0 deletions simplipy/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define utility modules."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions simplipy/util/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define some utilities to work with SimpliSafe's authentication mechanism."""

from __future__ import annotations

import base64
Expand Down
1 change: 1 addition & 0 deletions simplipy/util/dt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define datetime utilities."""

from datetime import datetime

try:
Expand Down
1 change: 1 addition & 0 deletions simplipy/util/string.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define various string utilities."""

import re


Expand Down
1 change: 1 addition & 0 deletions simplipy/websocket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define a connection to the SimpliSafe websocket."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define common test utilities."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define fixtures, constants, etc. available for all tests."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions tests/sensor/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define base tests for Sensor objects."""

import aiohttp
import pytest
from aresponses import ResponsesMockServer
Expand Down
1 change: 1 addition & 0 deletions tests/sensor/test_v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for V2 Sensor objects."""

from typing import cast

import aiohttp
Expand Down
1 change: 1 addition & 0 deletions tests/sensor/test_v3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for v3 Sensor objects."""

from typing import cast

import aiohttp
Expand Down
7 changes: 4 additions & 3 deletions tests/system/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define base tests for System objects."""

from datetime import datetime
from typing import Any, cast
from unittest.mock import Mock
Expand Down Expand Up @@ -262,9 +263,9 @@ async def test_unknown_system_state( # pylint: disable=too-many-arguments
v3_sensors_response: An API response payload.
v3_settings_response: An API response payload.
"""
subscriptions_response["subscriptions"][0]["location"]["system"][
"alarmState"
] = "NOT_REAL_STATE"
subscriptions_response["subscriptions"][0]["location"]["system"]["alarmState"] = (
"NOT_REAL_STATE"
)

async with authenticated_simplisafe_server:
authenticated_simplisafe_server.add(
Expand Down
1 change: 1 addition & 0 deletions tests/system/test_v2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for v2 System objects."""

from typing import Any

import aiohttp
Expand Down
1 change: 1 addition & 0 deletions tests/system/test_v3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for v3 System objects."""

# pylint: disable=too-many-lines
import logging
from datetime import datetime, timedelta, timezone
Expand Down
1 change: 1 addition & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for the System object."""

# pylint: disable=protected-access
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for the Camera objects."""

from __future__ import annotations

from typing import cast
Expand Down
1 change: 1 addition & 0 deletions tests/test_lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for the Lock objects."""

# pylint: disable=protected-access
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions tests/test_media.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for motion detection media fetching."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions tests/test_websocket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define tests for the System object."""

from __future__ import annotations

import asyncio
Expand Down

0 comments on commit 5e18656

Please sign in to comment.