Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"

jobs:
codespell:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
- published

env:
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"

jobs:
release:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"

jobs:
pytest:
Expand All @@ -18,7 +18,6 @@ jobs:
strategy:
matrix:
python:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

env:
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"

jobs:
mypy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ manager.

You need at least:

- Python 3.10+
- Python 3.11+
- [Poetry][poetry-install]

Install all packages, including all development requirements:
Expand Down
82 changes: 8 additions & 74 deletions poetry.lock

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

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -31,7 +30,7 @@ example = "examples.energy:start"
aiohttp = ">=3.0.0"
aiozoneinfo = "0.*"
async-timeout = ">=4.0.3,<6.0.0"
python = "^3.10"
python = "^3.11"
yarl = ">=1.6.0"

[tool.poetry.group.dev.dependencies]
Expand Down Expand Up @@ -139,7 +138,7 @@ addopts = "--cov"
asyncio_mode = "auto"

[tool.ruff]
target-version = "py310"
target-version = "py311"

[tool.ruff.lint]
select = ["ALL"]
Expand Down
6 changes: 3 additions & 3 deletions spothinta_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
Expand Down Expand Up @@ -274,7 +274,7 @@ def prices_today(self) -> dict[datetime, float]:
# not 24, due to the shifted/repeated hour. We count UTC hours that
# correspond to the local date to handle DST correctly.
day_start = datetime.combine(today, datetime.min.time(), tzinfo=self.time_zone)
day_start_utc = day_start.astimezone(timezone.utc)
day_start_utc = day_start.astimezone(UTC)

# Count UTC hours that fall within this local date
hour_count = 0
Expand Down Expand Up @@ -317,7 +317,7 @@ def prices_tomorrow(self) -> dict[datetime, float]:
datetime.min.time(),
tzinfo=self.time_zone,
)
day_start_utc = day_start.astimezone(timezone.utc)
day_start_utc = day_start.astimezone(UTC)

# Count UTC hours that fall within this local date
hour_count = 0
Expand Down
5 changes: 2 additions & 3 deletions spothinta_api/spothinta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

import asyncio
import socket
from dataclasses import dataclass
from datetime import timedelta
Expand All @@ -27,7 +26,7 @@
from .models import Electricity

if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

VERSION = metadata.version(__package__)

Expand Down Expand Up @@ -94,7 +93,7 @@ async def _request(
ssl=True,
)
response.raise_for_status()
except asyncio.TimeoutError as ex:
except TimeoutError as ex:
msg = "Timeout occurred while connecting to the API."
raise SpotHintaConnectionError(
msg,
Expand Down
Loading
Loading