From 9ae72a871bb06a8c90a7cee6f889cd6861b18470 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 14 Mar 2024 03:11:57 -0700 Subject: [PATCH] resources: remove unnecessary os.path.dirname import Signed-off-by: David Aguilar --- cola/resources.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cola/resources.py b/cola/resources.py index 4648152e..f5f555db 100644 --- a/cola/resources.py +++ b/cola/resources.py @@ -1,6 +1,5 @@ """Functions for finding cola resources""" import os -from os.path import dirname import webbrowser from . import core @@ -17,15 +16,17 @@ if _package.endswith(os.path.join('site-packages', 'cola')): # Unix release tree # __file__ = '$prefix/lib/pythonX.Y/site-packages/cola/__file__.py' # _package = '$prefix/lib/pythonX.Y/site-packages/cola' - _prefix = dirname(dirname(dirname(dirname(_package)))) + _prefix = os.path.dirname( + os.path.dirname(os.path.dirname(os.path.dirname(_package))) + ) elif _package.endswith(os.path.join('pkgs', 'cola')): # Windows release tree # __file__ = $installdir/pkgs/cola - _prefix = dirname(dirname(_package)) + _prefix = os.path.dirname(os.path.dirname(_package)) else: # this is the source tree # __file__ = '$prefix/cola/__file__.py' - _prefix = dirname(_package) + _prefix = os.path.dirname(_package) def get_prefix(): -- 2.11.4.GIT