mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-07 11:03:37 +00:00
review fixes
This commit is contained in:
@@ -97,8 +97,9 @@ class ArchiveTree(LazyLogging):
|
|||||||
parents = [repository] + list(repository.parents[:-1])
|
parents = [repository] + list(repository.parents[:-1])
|
||||||
for parent in parents:
|
for parent in parents:
|
||||||
path = root / parent
|
path = root / parent
|
||||||
if not list(path.iterdir()):
|
if list(path.iterdir()):
|
||||||
path.rmdir()
|
continue # directory is not empty
|
||||||
|
path.rmdir()
|
||||||
|
|
||||||
def repository_for(self, date: datetime.date | None = None) -> Path:
|
def repository_for(self, date: datetime.date | None = None) -> Path:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -26,16 +26,12 @@ from dataclasses import dataclass, field
|
|||||||
from functools import cached_property
|
from functools import cached_property
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from pwd import getpwuid
|
from pwd import getpwuid
|
||||||
from typing import ParamSpec
|
|
||||||
|
|
||||||
from ahriman.core.log import LazyLogging
|
from ahriman.core.log import LazyLogging
|
||||||
from ahriman.core.utils import owner
|
from ahriman.core.utils import owner
|
||||||
from ahriman.models.repository_id import RepositoryId
|
from ahriman.models.repository_id import RepositoryId
|
||||||
|
|
||||||
|
|
||||||
Params = ParamSpec("Params")
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class RepositoryPaths(LazyLogging):
|
class RepositoryPaths(LazyLogging):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user