mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Bump platformdirs from 3.11.0 to 4.2.0 (#2258)
* Bump platformdirs from 3.11.0 to 4.2.0 Bumps [platformdirs](https://github.com/platformdirs/platformdirs) from 3.11.0 to 4.2.0. - [Release notes](https://github.com/platformdirs/platformdirs/releases) - [Changelog](https://github.com/platformdirs/platformdirs/blob/main/CHANGES.rst) - [Commits](https://github.com/platformdirs/platformdirs/compare/3.11.0...4.2.0) --- updated-dependencies: - dependency-name: platformdirs dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update platformdirs==4.2.0 --------- 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
a4cfc6323d
commit
13eb0fd6db
9 changed files with 93 additions and 37 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Base API."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
@ -7,12 +8,7 @@ from pathlib import Path
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 8): # pragma: no cover (py38+)
|
||||
from typing import Literal
|
||||
else: # pragma: no cover (py38+)
|
||||
from typing_extensions import Literal
|
||||
from typing import Iterator, Literal
|
||||
|
||||
|
||||
class PlatformDirsABC(ABC):
|
||||
|
@ -241,3 +237,43 @@ class PlatformDirsABC(ABC):
|
|||
def site_runtime_path(self) -> Path:
|
||||
""":return: runtime path shared by users"""
|
||||
return Path(self.site_runtime_dir)
|
||||
|
||||
def iter_config_dirs(self) -> Iterator[str]:
|
||||
""":yield: all user and site configuration directories."""
|
||||
yield self.user_config_dir
|
||||
yield self.site_config_dir
|
||||
|
||||
def iter_data_dirs(self) -> Iterator[str]:
|
||||
""":yield: all user and site data directories."""
|
||||
yield self.user_data_dir
|
||||
yield self.site_data_dir
|
||||
|
||||
def iter_cache_dirs(self) -> Iterator[str]:
|
||||
""":yield: all user and site cache directories."""
|
||||
yield self.user_cache_dir
|
||||
yield self.site_cache_dir
|
||||
|
||||
def iter_runtime_dirs(self) -> Iterator[str]:
|
||||
""":yield: all user and site runtime directories."""
|
||||
yield self.user_runtime_dir
|
||||
yield self.site_runtime_dir
|
||||
|
||||
def iter_config_paths(self) -> Iterator[Path]:
|
||||
""":yield: all user and site configuration paths."""
|
||||
for path in self.iter_config_dirs():
|
||||
yield Path(path)
|
||||
|
||||
def iter_data_paths(self) -> Iterator[Path]:
|
||||
""":yield: all user and site data paths."""
|
||||
for path in self.iter_data_dirs():
|
||||
yield Path(path)
|
||||
|
||||
def iter_cache_paths(self) -> Iterator[Path]:
|
||||
""":yield: all user and site cache paths."""
|
||||
for path in self.iter_cache_dirs():
|
||||
yield Path(path)
|
||||
|
||||
def iter_runtime_paths(self) -> Iterator[Path]:
|
||||
""":yield: all user and site runtime paths."""
|
||||
for path in self.iter_runtime_dirs():
|
||||
yield Path(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue