Skip to content

Commit 44e6509

Browse files
tomer-wCopilot
andcommitted
Bump Python target from 3.12 to 3.13
- Update ruff target-version, pylint py-version, mypy python_version - Remove from __future__ import annotations from 3 files - Add ServiceCall to runtime import in __init__.py - Quote forward reference VictronMQTTOptionsFlow in config_flow.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6b4e642 commit 44e6509

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

custom_components/victron_mqtt/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
"""The victron_mqtt integration."""
22

3-
from __future__ import annotations
4-
53
import asyncio
64
import importlib.metadata
75
import logging
86

97
from homeassistant.const import EVENT_HOMEASSISTANT_STOP, Platform
10-
from homeassistant.core import Event, HomeAssistant
8+
from homeassistant.core import Event, HomeAssistant, ServiceCall
119
from homeassistant.helpers.typing import ConfigType
1210
from homeassistant.exceptions import HomeAssistantError
1311

custom_components/victron_mqtt/config_flow.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Config flow for victron mqtt integration."""
22

3-
from __future__ import annotations
4-
53
from collections.abc import Mapping, Sequence
64
import logging
75
from types import MappingProxyType
@@ -264,7 +262,7 @@ async def async_step_reauth_confirm(
264262
)
265263

266264
@staticmethod
267-
def async_get_options_flow(config_entry: ConfigEntry) -> VictronMQTTOptionsFlow:
265+
def async_get_options_flow(config_entry: ConfigEntry) -> "VictronMQTTOptionsFlow":
268266
"""Get the options flow for this handler."""
269267
_LOGGER.info("Getting options flow handler")
270268
return VictronMQTTOptionsFlow()

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.ruff]
2-
target-version = "py312"
2+
target-version = "py313"
33

44
select = [
55
"B007", # Loop control variable {name} not used within loop body
@@ -54,7 +54,7 @@ max-complexity = 15
5454
"tests/**/test_*.py" = ["D"]
5555

5656
[tool.pylint.MAIN]
57-
py-version = "3.12"
57+
py-version = "3.13"
5858
ignore = [
5959
"tests",
6060
]
@@ -107,7 +107,7 @@ source = ["custom_components"]
107107
exclude_lines = ["pragma: no cover", "raise NotImplementedError", "if TYPE_CHECKING:", "if __name__ == '__main__':"]
108108

109109
[tool.mypy]
110-
python_version = "3.12"
110+
python_version = "3.13"
111111
show_error_codes = true
112112
follow_imports = "silent"
113113
ignore_missing_imports = true

tests/test_entity.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Unit tests for Victron GX MQTT entities."""
22

3-
from __future__ import annotations
4-
53
from unittest.mock import MagicMock, patch
64

75
import pytest

0 commit comments

Comments
 (0)