Skip to content

Commit

Permalink
chore: first ruff run (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Mindêllo de Andrade <lucas@mindello.com.br>
  • Loading branch information
chemelli74 and rokam authored May 28, 2024
1 parent ac7f78e commit 27164ff
Show file tree
Hide file tree
Showing 80 changed files with 548 additions and 399 deletions.
2 changes: 1 addition & 1 deletion library_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import aiohttp

from midealocal.cloud import get_midea_cloud, clouds
from midealocal.cloud import clouds, get_midea_cloud
from midealocal.devices import device_selector
from midealocal.discover import discover

Expand Down
13 changes: 9 additions & 4 deletions midealocal/backports/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class StrEnum(str, Enum):
"""Partial backport of Python 3.11's StrEnum for our basic use cases."""

def __new__(
cls: type[_StrEnumSelfT], value: str, *args: Any, **kwargs: Any
cls: type[_StrEnumSelfT],
value: str,
*args: Any,
**kwargs: Any,
) -> _StrEnumSelfT:
"""Create a new StrEnum instance."""
if not isinstance(value, str):
Expand All @@ -25,10 +28,12 @@ def __str__(self) -> str:

@staticmethod
def _generate_next_value_(
name: str, start: int, count: int, last_values: list[Any]
name: str,
start: int,
count: int,
last_values: list[Any],
) -> Any:
"""
Make `auto()` explicitly unsupported.
"""Make `auto()` explicitly unsupported.
We may revisit this when it's very clear that Python 3.11's
`StrEnum.auto()` behavior will no longer change.
"""
Expand Down
Loading

0 comments on commit 27164ff

Please sign in to comment.