From 28e872a871aef6d7497e405e390183f3a4e5cfc1 Mon Sep 17 00:00:00 2001 From: Nathan Spencer Date: Thu, 4 Apr 2024 10:50:43 -0600 Subject: [PATCH] Ruff formatting --- pylitterbot/__init__.py | 1 + pylitterbot/account.py | 1 + pylitterbot/activity.py | 1 + pylitterbot/enums.py | 1 + pylitterbot/event.py | 1 + pylitterbot/robot/__init__.py | 1 + pylitterbot/robot/feederrobot.py | 1 + pylitterbot/robot/litterrobot.py | 1 + pylitterbot/robot/litterrobot3.py | 1 + pylitterbot/robot/litterrobot4.py | 1 + pylitterbot/robot/models.py | 1 + pylitterbot/session.py | 1 + pylitterbot/utils.py | 4 ++-- pylitterbot/ws_monitor.py | 1 + tests/common.py | 1 + tests/conftest.py | 1 + tests/test_account.py | 1 + tests/test_enums.py | 1 + tests/test_feederrobot.py | 1 + tests/test_init.py | 1 + tests/test_litterrobot4.py | 1 + tests/test_robot.py | 1 + tests/test_session.py | 1 + 23 files changed, 24 insertions(+), 2 deletions(-) diff --git a/pylitterbot/__init__.py b/pylitterbot/__init__.py index 030ea8e..e66ac87 100644 --- a/pylitterbot/__init__.py +++ b/pylitterbot/__init__.py @@ -1,4 +1,5 @@ """pylitterbot module.""" + __version__ = "0.0.0" from .account import Account diff --git a/pylitterbot/account.py b/pylitterbot/account.py index ed0e1ef..b2470da 100644 --- a/pylitterbot/account.py +++ b/pylitterbot/account.py @@ -1,4 +1,5 @@ """Account access and data handling for Litter-Robot endpoint.""" + from __future__ import annotations import asyncio diff --git a/pylitterbot/activity.py b/pylitterbot/activity.py index 461d72a..e889049 100644 --- a/pylitterbot/activity.py +++ b/pylitterbot/activity.py @@ -1,4 +1,5 @@ """pylitterbot activity and insight classes.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/pylitterbot/enums.py b/pylitterbot/enums.py index 009386f..e60f2d2 100644 --- a/pylitterbot/enums.py +++ b/pylitterbot/enums.py @@ -1,4 +1,5 @@ """pylitterbot enums.""" + from __future__ import annotations import logging diff --git a/pylitterbot/event.py b/pylitterbot/event.py index 734ed9f..d0f6e5e 100644 --- a/pylitterbot/event.py +++ b/pylitterbot/event.py @@ -1,4 +1,5 @@ """Event handling class for pylitterbot.""" + from __future__ import annotations from collections.abc import Callable diff --git a/pylitterbot/robot/__init__.py b/pylitterbot/robot/__init__.py index af249cb..236948a 100644 --- a/pylitterbot/robot/__init__.py +++ b/pylitterbot/robot/__init__.py @@ -1,4 +1,5 @@ """Robot base class.""" + from __future__ import annotations import logging diff --git a/pylitterbot/robot/feederrobot.py b/pylitterbot/robot/feederrobot.py index 35efdf1..51030e6 100644 --- a/pylitterbot/robot/feederrobot.py +++ b/pylitterbot/robot/feederrobot.py @@ -1,4 +1,5 @@ """Feeder-Robot.""" + from __future__ import annotations import logging diff --git a/pylitterbot/robot/litterrobot.py b/pylitterbot/robot/litterrobot.py index c15e194..631b5e5 100644 --- a/pylitterbot/robot/litterrobot.py +++ b/pylitterbot/robot/litterrobot.py @@ -1,4 +1,5 @@ """Litter-Robot base class.""" + from __future__ import annotations import logging diff --git a/pylitterbot/robot/litterrobot3.py b/pylitterbot/robot/litterrobot3.py index 9967a1f..032d5c2 100644 --- a/pylitterbot/robot/litterrobot3.py +++ b/pylitterbot/robot/litterrobot3.py @@ -1,4 +1,5 @@ """Litter-Robot 3.""" + from __future__ import annotations import logging diff --git a/pylitterbot/robot/litterrobot4.py b/pylitterbot/robot/litterrobot4.py index e34959d..c8fb78a 100644 --- a/pylitterbot/robot/litterrobot4.py +++ b/pylitterbot/robot/litterrobot4.py @@ -1,4 +1,5 @@ """Litter-Robot 4.""" + from __future__ import annotations import logging diff --git a/pylitterbot/robot/models.py b/pylitterbot/robot/models.py index 19deec6..6d09b36 100644 --- a/pylitterbot/robot/models.py +++ b/pylitterbot/robot/models.py @@ -1,4 +1,5 @@ """pylitterbot robot models.""" + FEEDER_ROBOT_MODEL = """ { id diff --git a/pylitterbot/session.py b/pylitterbot/session.py index cee8dc5..d224274 100644 --- a/pylitterbot/session.py +++ b/pylitterbot/session.py @@ -1,4 +1,5 @@ """Session handling for litter-robot endpoint.""" + from __future__ import annotations import logging diff --git a/pylitterbot/utils.py b/pylitterbot/utils.py index 9258b2f..f4f1ce3 100644 --- a/pylitterbot/utils.py +++ b/pylitterbot/utils.py @@ -1,4 +1,5 @@ """Utilities module.""" + from __future__ import annotations import json @@ -109,8 +110,7 @@ def redact(data: Mapping) -> dict: # type: ignore[overload-overlap] @overload -def redact(data: _T) -> _T: - ... +def redact(data: _T) -> _T: ... def redact(data: _T) -> _T: diff --git a/pylitterbot/ws_monitor.py b/pylitterbot/ws_monitor.py index 8a5d0b1..8fb33be 100644 --- a/pylitterbot/ws_monitor.py +++ b/pylitterbot/ws_monitor.py @@ -1,4 +1,5 @@ """Websocket monitor.""" + from __future__ import annotations import asyncio diff --git a/tests/common.py b/tests/common.py index ae2c59e..2212b3d 100644 --- a/tests/common.py +++ b/tests/common.py @@ -1,4 +1,5 @@ """Common test module.""" + from __future__ import annotations from collections.abc import Callable diff --git a/tests/conftest.py b/tests/conftest.py index 6a5720e..66ea7f6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Conftest.""" + from __future__ import annotations import re diff --git a/tests/test_account.py b/tests/test_account.py index 5cdfaf1..26875df 100644 --- a/tests/test_account.py +++ b/tests/test_account.py @@ -1,4 +1,5 @@ """Test account module.""" + from __future__ import annotations import logging diff --git a/tests/test_enums.py b/tests/test_enums.py index e46d318..de0cc09 100644 --- a/tests/test_enums.py +++ b/tests/test_enums.py @@ -1,4 +1,5 @@ """Test enums module.""" + from pylitterbot.enums import LitterBoxStatus diff --git a/tests/test_feederrobot.py b/tests/test_feederrobot.py index aebd7cd..9421b4e 100644 --- a/tests/test_feederrobot.py +++ b/tests/test_feederrobot.py @@ -1,4 +1,5 @@ """Test feederrobot module.""" + # pylint: disable=protected-access import pytest from aioresponses import aioresponses diff --git a/tests/test_init.py b/tests/test_init.py index 2838837..8f9d493 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,4 +1,5 @@ """Tests module.""" + from pylitterbot import __version__ diff --git a/tests/test_litterrobot4.py b/tests/test_litterrobot4.py index 3d1e581..454efea 100644 --- a/tests/test_litterrobot4.py +++ b/tests/test_litterrobot4.py @@ -1,4 +1,5 @@ """Test litterrobot4 module.""" + # pylint: disable=protected-access from __future__ import annotations diff --git a/tests/test_robot.py b/tests/test_robot.py index dead917..824c861 100644 --- a/tests/test_robot.py +++ b/tests/test_robot.py @@ -1,4 +1,5 @@ """Test robot module.""" + # pylint: disable=protected-access import asyncio import logging diff --git a/tests/test_session.py b/tests/test_session.py index e247901..d40f476 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -1,4 +1,5 @@ """Test session module.""" + # pylint: disable=protected-access from datetime import datetime, timedelta, timezone