mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Bump platformdirs from 4.2.2 to 4.3.6 (#2403)
* Bump platformdirs from 4.2.2 to 4.3.6 Bumps [platformdirs](https://github.com/tox-dev/platformdirs) from 4.2.2 to 4.3.6. - [Release notes](https://github.com/tox-dev/platformdirs/releases) - [Changelog](https://github.com/tox-dev/platformdirs/blob/main/CHANGES.rst) - [Commits](https://github.com/tox-dev/platformdirs/compare/4.2.2...4.3.6) --- updated-dependencies: - dependency-name: platformdirs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update platformdirs==4.3.6 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
bf07912711
commit
025e8bcf58
7 changed files with 38 additions and 20 deletions
|
@ -19,18 +19,18 @@ if TYPE_CHECKING:
|
|||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
if sys.platform == "win32":
|
||||
from platformdirs.windows import Windows as _Result
|
||||
elif sys.platform == "darwin":
|
||||
from platformdirs.macos import MacOS as _Result
|
||||
else:
|
||||
from platformdirs.unix import Unix as _Result
|
||||
|
||||
|
||||
def _set_platform_dir_class() -> type[PlatformDirsABC]:
|
||||
if sys.platform == "win32":
|
||||
from platformdirs.windows import Windows as Result # noqa: PLC0415
|
||||
elif sys.platform == "darwin":
|
||||
from platformdirs.macos import MacOS as Result # noqa: PLC0415
|
||||
else:
|
||||
from platformdirs.unix import Unix as Result # noqa: PLC0415
|
||||
|
||||
if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
|
||||
if os.getenv("SHELL") or os.getenv("PREFIX"):
|
||||
return Result
|
||||
return _Result
|
||||
|
||||
from platformdirs.android import _android_folder # noqa: PLC0415
|
||||
|
||||
|
@ -39,10 +39,14 @@ def _set_platform_dir_class() -> type[PlatformDirsABC]:
|
|||
|
||||
return Android # return to avoid redefinition of a result
|
||||
|
||||
return Result
|
||||
return _Result
|
||||
|
||||
|
||||
PlatformDirs = _set_platform_dir_class() #: Currently active platform
|
||||
if TYPE_CHECKING:
|
||||
# Work around mypy issue: https://github.com/python/mypy/issues/10962
|
||||
PlatformDirs = _Result
|
||||
else:
|
||||
PlatformDirs = _set_platform_dir_class() #: Currently active platform
|
||||
AppDirs = PlatformDirs #: Backwards compatibility with appdirs
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue