Skip to content
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[project]
name = "properpath"
version = "0.2.11"
version = "0.2.12"
authors = [{ name = "Alexander Haller, Mahadi Xion", email = "elabftw@uni-heidelberg.de" }]
maintainers = [{ name = "Mahadi Xion", email = "mahadi.xion@urz.uni-heidelberg.de" }]
readme = "README.md"
description = "A pathlib.Path drop-in replacement with extra features. "
requires-python = ">=3.12"
dependencies = [
"platformdirs>=4.5.1,<4.6.0",
"platformdirs>=4.6.0,<4.7.0",
]
license = "MIT"
keywords = [
Expand Down
4 changes: 4 additions & 0 deletions src/properpath/platformdirs_.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import typing
from dataclasses import asdict, dataclass
from pathlib import Path

Expand All @@ -7,6 +8,9 @@
from platformdirs.unix import Unix
from platformdirs.windows import Windows

if typing.TYPE_CHECKING:
from .properpath import ProperPath


@dataclass(frozen=True)
class PlatformDirsCommonAttrs:
Expand Down
11 changes: 11 additions & 0 deletions src/properpath/platformdirs_.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import typing
from pathlib import Path

if typing.TYPE_CHECKING:
from .properpath import ProperPath
Expand Down Expand Up @@ -71,6 +72,8 @@ class ProperPlatformDirs:
user_state_path: ProperPath
user_videos_dir: ProperPath

def __init__(self, *args, path_cls: type[Path], **kwargs) -> None: ...

class ProperUnix:
site_cache_dir: ProperPath
site_cache_path: ProperPath
Expand Down Expand Up @@ -104,6 +107,8 @@ class ProperUnix:
user_state_path: ProperPath
user_videos_dir: ProperPath

def __init__(self, *args, path_cls: type[Path], **kwargs) -> None: ...

class ProperMacOS:
site_cache_dir: ProperPath
site_cache_path: ProperPath
Expand Down Expand Up @@ -137,6 +142,8 @@ class ProperMacOS:
user_state_path: ProperPath
user_videos_dir: ProperPath

def __init__(self, *args, path_cls: type[Path], **kwargs) -> None: ...

class ProperAndroid:
site_cache_dir: ProperPath
site_cache_path: ProperPath
Expand Down Expand Up @@ -170,6 +177,8 @@ class ProperAndroid:
user_state_path: ProperPath
user_videos_dir: ProperPath

def __init__(self, *args, path_cls: type[Path], **kwargs) -> None: ...

class ProperWindows:
site_cache_dir: ProperPath
site_cache_path: ProperPath
Expand Down Expand Up @@ -202,3 +211,5 @@ class ProperWindows:
user_state_dir: ProperPath
user_state_path: ProperPath
user_videos_dir: ProperPath

def __init__(self, *args, path_cls: type[Path], **kwargs) -> None: ...
2 changes: 1 addition & 1 deletion src/properpath/properpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def remove(self, parent_only: bool = False, verbose: bool = True) -> None:
Removes the `ProperPath` file or directory based on the specified parameters. The method
removes either only parent contents or everything recursively depending on the type of
the path (file or directory). If `parent_only` is True, only top-level files are removed and top-level
directories are left as is. If `parent_only` is False, all files, directories, sub-directories are
directories are left as is. If `parent_only` is False, all files, directories, subdirectories are
removed recursively. `verbose` can be passed `False` (default is `True`) to disable logging
the removals.

Expand Down
Loading