From a5ca3a60440d740a4d6b67e255c2d6c777a027c0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 10 Jun 2024 15:39:39 +0200 Subject: [PATCH] lint main --- rwx/__main__.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rwx/__main__.py b/rwx/__main__.py index a857803..519fb8e 100755 --- a/rwx/__main__.py +++ b/rwx/__main__.py @@ -1,14 +1,11 @@ #! /usr/bin/env python3 - -import os - +from pathlib import Path import fs - if __name__ == "__main__": - file_path = os.path.realpath(__file__) - root_path = os.path.dirname(file_path) - directory_path = os.path.join(root_path, "tmp") - file_path = os.path.join(directory_path, "file") + file_path = Path(__file__).resolve() + root_path = file_path.parent + directory_path = root_path / "tmp" + file_path = directory_path / "file" fs.wipe(directory_path) fs.make_directory(directory_path)