From 89d5f12fa66534e67683f7e9a791d84c14b51176 Mon Sep 17 00:00:00 2001 From: Robert Vitonsky Date: Tue, 23 Apr 2024 16:36:30 +0200 Subject: [PATCH] refactor: simplify code in upgrade.py --- scripts/upgrade.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade.py b/scripts/upgrade.py index 9971694a..a07a5048 100644 --- a/scripts/upgrade.py +++ b/scripts/upgrade.py @@ -1,9 +1,10 @@ -# Говнокод ON import os from sys import path -from os.path import dirname as dir -path.append(dir(path[0])) -# Говнокод OFF +from os.path import dirname, abspath + +# Add the parent directory of the current script to the Python module search path +current_dir = dirname(abspath(__file__)) +path.append(current_dir) from mypylib.mypylib import *