Skip to content

Commit 59de228

Browse files
committed
replace deprecated appdirs with platfromdirs fork
1 parent 35b1ab2 commit 59de228

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

miio/integrations/roborock/vacuum/vacuum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import click
1414
import pytz
15-
from appdirs import user_cache_dir
15+
from platformdirs import user_cache_dir
1616

1717
from miio.click_common import (
1818
DeviceGroup,

miio/integrations/roborock/vacuum/vacuum_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import Any, List # noqa: F401
1111

1212
import click
13-
from appdirs import user_cache_dir
13+
from platformdirs import user_cache_dir
1414
from tqdm import tqdm
1515

1616
from miio.click_common import (

miio/miot_cloud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pathlib import Path
88
from typing import Dict, List, Optional
99

10-
import appdirs
10+
import platformdirs
1111
from micloud.miotspec import MiotSpec
1212

1313
try:
@@ -66,7 +66,7 @@ class MiotCloud:
6666
MODEL_MAPPING_FILE = "model-to-urn.json"
6767

6868
def __init__(self):
69-
self._cache_dir = Path(appdirs.user_cache_dir("python-miio"))
69+
self._cache_dir = Path(platformdirs.user_cache_dir("python-miio"))
7070

7171
def get_release_list(self) -> ReleaseList:
7272
"""Fetch a list of available releases."""

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ construct = "^2.10.56"
3434
zeroconf = "^0"
3535
attrs = "*"
3636
pytz = "*"
37-
appdirs = "^1"
37+
platformdirs = "*"
3838
tqdm = "^4"
3939
micloud = { version = ">=0.6" }
4040
croniter = ">=1"
@@ -84,13 +84,14 @@ use_parentheses = true
8484
line_length = 88
8585
forced_separate = "miio.discover"
8686
known_first_party = "miio"
87-
known_third_party = ["appdirs",
87+
known_third_party = [
8888
"attr",
8989
"click",
9090
"construct",
9191
"croniter",
9292
"cryptography",
9393
"netifaces",
94+
"platformdirs",
9495
"pytest",
9596
"pytz",
9697
"setuptools",

0 commit comments

Comments
 (0)