From 0aa44c23bb3eec9f0d44761d196adae2fa272e71 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 24 Jul 2020 19:18:06 +0200 Subject: [PATCH] objectstore: use types.PathLike Use the new `types.PathLike`, which is exactly the type that this module defined too. --- osbuild/objectstore.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osbuild/objectstore.py b/osbuild/objectstore.py index 4c055cef..03ff7d91 100644 --- a/osbuild/objectstore.py +++ b/osbuild/objectstore.py @@ -5,8 +5,9 @@ import os import subprocess import tempfile import weakref -from typing import Optional, Union +from typing import Optional +from osbuild.util.types import PathLike from osbuild.util import ctx, rmrf from . import treesum @@ -16,10 +17,6 @@ __all__ = [ ] -# Type for valid inputs to `os.fspath` -PathLike = Union[str, bytes, os.PathLike] - - def mount(source, target, bind=True, ro=True, private=True, mode="0755"): options = [] if bind: