Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libraries in dev container #46

Merged
merged 6 commits into from
Jan 9, 2025
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 .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Python - Duplicati integration",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"image": "mcr.microsoft.com/devcontainers/python:3.13",
"postCreateCommand": "bash scripts/setup",
"forwardPorts": [
8123
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.2.1"
uses: "actions/checkout@v4.2.2"

- name: "Set up Python"
uses: actions/setup-python@v5.2.0
uses: actions/setup-python@v5.3.0
with:
python-version: "3.12"
cache: "pip"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
contents: write
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.2.1"
uses: "actions/checkout@v4.2.2"

- name: "ZIP the integration directory"
shell: "bash"
Expand All @@ -24,6 +24,6 @@ jobs:
zip duplicati.zip -r ./

- name: "Upload the ZIP file to the release"
uses: "softprops/action-gh-release@v2.0.8"
uses: "softprops/action-gh-release@v2.2.0"
with:
files: ${{ github.workspace }}/custom_components/duplicati/duplicati.zip
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.2.1"
uses: "actions/checkout@v4.2.2"

- name: "Run hassfest validation"
uses: "home-assistant/actions/hassfest@master"
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v4.2.1"
uses: "actions/checkout@v4.2.2"

- name: "Run HACS validation"
uses: "hacs/action@main"
Expand Down
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ ignore = [
"PLR0915", # Too many statements ({statements} > {max_statements})
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
"PT004", # Fixture {fixture} does not return anything, add leading underscore
"PT011", # pytest.raises({exception}) is too broad, set the `match` parameter or use a more specific exception
"PT018", # Assertion should be broken down into multiple parts
"RUF001", # String contains ambiguous unicode character.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/duplicati/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
device_registry.async_update_device(
device_id=device.id,
name=backup_name,
add_config_entry=entry,
add_config_entry_id=entry.entry_id,
remove_config_entry_id=config_entry.entry_id,
)
# Collect old entries (with same URL but different backup ID) for removal
Expand Down
2 changes: 1 addition & 1 deletion custom_components/duplicati/auth_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def __ensure_xsrf_token(self) -> None:
history=response.history,
status=response.status,
message="Failed to retrieve XSRF token",
headers=response.headers,
headers=HttpResponse.convert_headers(response.headers),
)

xsrf_token = self.http_client.cookie_manager.stored_cookies.get("xsrf-token")
Expand Down
2 changes: 1 addition & 1 deletion custom_components/duplicati/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ async def make_request(
url=url,
headers=headers,
data=data,
verify_ssl=self.verify_ssl,
ssl=self.verify_ssl,
allow_redirects=False,
) as response:
# Handle response
Expand Down
5 changes: 2 additions & 3 deletions custom_components/duplicati/options_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
from typing import Any

import voluptuous as vol
from homeassistant.config_entries import ConfigEntry, OptionsFlow
from homeassistant.config_entries import ConfigEntry, ConfigFlowResult, OptionsFlow
from homeassistant.const import (
CONF_SCAN_INTERVAL,
)
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.selector import (
SelectSelector,
SelectSelectorConfig,
Expand Down Expand Up @@ -82,7 +81,7 @@ def __update_scan_interval(self, new_scan_interval: int) -> None:

async def async_step_init(
self, user_input: dict[str, Any] | None = None
) -> FlowResult:
) -> ConfigFlowResult:
"""Manage the options."""
try:
errors: dict[str, str] = {}
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
colorlog==6.8.2
homeassistant==2024.7.0
pip>=21.0,<24.3
ruff==0.7.0
colorlog==6.9.0
homeassistant==2025.1.0
pip>=21.3.1
ruff==0.8.6
Loading