Skip to content

Commit a713ebd

Browse files
Copilotkarangattuschloerke
authored
fix(dependency): Replace deprecated appdirs with platformdirs (#2030)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Karan Gathani <[email protected]> Co-authored-by: Barret Schloerke <[email protected]>
1 parent 9b5a817 commit a713ebd

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ clean-test: FORCE
5656
rm -fr .pytest_cache
5757
rm -rf typings/
5858

59-
typings/appdirs:
60-
@echo "Creating appdirs stubs"
61-
pyright --createstub appdirs
6259
typings/folium:
6360
@echo "Creating folium stubs"
6461
pyright --createstub folium
@@ -75,7 +72,7 @@ typings/matplotlib/__init__.pyi:
7572
mv typings/python-type-stubs/stubs/matplotlib typings/
7673
rm -rf typings/python-type-stubs
7774

78-
pyright-typings: typings/appdirs typings/folium typings/uvicorn typings/seaborn typings/matplotlib/__init__.pyi
75+
pyright-typings: typings/folium typings/uvicorn typings/seaborn typings/matplotlib/__init__.pyi
7976

8077
check: check-format check-lint check-types check-tests ## check code, style, types, and test (basic CI)
8178
check-fix: format check-lint check-types check-tests ## check and format code, style, types, and test

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"markdown-it-py>=1.1.0",
3838
"mdit-py-plugins>=0.3.0",
3939
"linkify-it-py>=1.0",
40-
"appdirs>=1.4.4",
40+
"platformdirs>=2.1.0",
4141
"asgiref>=3.5.2",
4242
"packaging>=20.9",
4343
"watchfiles>=0.18.0;platform_system!='Emscripten'",

shiny/_static.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,10 @@ def remove_shinylive_local(
3636

3737

3838
def get_default_shinylive_dir() -> Path:
39-
import appdirs
40-
41-
return (
42-
Path(
43-
appdirs.user_cache_dir( # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
44-
"shiny"
45-
)
46-
)
47-
/ "shinylive"
48-
)
39+
import platformdirs
40+
41+
user_cache_dir = platformdirs.user_cache_dir("shinylive")
42+
return Path(user_cache_dir) / "shinylive"
4943

5044

5145
def _installed_shinylive_versions(shinylive_dir: Optional[Path] = None) -> list[str]:

0 commit comments

Comments
 (0)