Skip to content

Commit

Permalink
Bump black from 23.12.1 to 24.1.1 (#830)
Browse files Browse the repository at this point in the history
* Bump black from 23.12.1 to 24.1.1

Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.1.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.12.1...24.1.1)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Reformat code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
  • Loading branch information
dependabot[bot] and KapJI authored Jan 30, 2024
1 parent f345654 commit f8881b3
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 29 deletions.
1 change: 1 addition & 0 deletions custom_components/google_home/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For more details about this integration, please refer to
https://github.com/leikoilja/ha-google-home
"""

from datetime import timedelta
import logging

Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sample API Client."""

from __future__ import annotations

import asyncio
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adds config flow for Google Home"""

from __future__ import annotations

from datetime import timedelta
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants for Google Home."""

from __future__ import annotations

from typing import Final
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/entity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines base entities for Google Home"""

from __future__ import annotations

from abc import ABC, abstractmethod
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The errors of GoogleHome integration."""

from homeassistant.exceptions import HomeAssistantError


Expand Down
11 changes: 7 additions & 4 deletions custom_components/google_home/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for Google Home"""

from __future__ import annotations

from datetime import timedelta
Expand Down Expand Up @@ -73,10 +74,12 @@ def get_sorted_alarms(self) -> list[GoogleHomeAlarm]:
"""Returns alarms in a sorted order. Inactive & missed alarms are at the end."""
return sorted(
self._alarms,
key=lambda k: k.fire_time
if k.status
not in (GoogleHomeAlarmStatus.INACTIVE, GoogleHomeAlarmStatus.MISSED)
else k.fire_time + sys.maxsize,
key=lambda k: (
k.fire_time
if k.status
not in (GoogleHomeAlarmStatus.INACTIVE, GoogleHomeAlarmStatus.MISSED)
else k.fire_time + sys.maxsize
),
)

def get_next_alarm(self) -> GoogleHomeAlarm | None:
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/number.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Number Platform for Google Home"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sensor platform for Google Home"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Switch platform for Google Home"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions custom_components/google_home/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Various types used in type hints."""

from __future__ import annotations

from collections.abc import Mapping
Expand Down
48 changes: 24 additions & 24 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 @@ -13,7 +13,7 @@ glocaltokens = "^0.7.0"
homeassistant = "2023.11.0"

[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
black = "^24.1.1"
codespell = "^2.2.5"
flake8 = "^7.0.0"
flake8-bugbear = "^24.1.17"
Expand Down

0 comments on commit f8881b3

Please sign in to comment.