From d5d7cf65af01af6b79dc9f65175d43d109fd300a Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Thu, 9 Apr 2026 19:34:38 +0100 Subject: [PATCH 1/2] Removed unused global variable DIR_DATKIT --- datkit/__init__.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/datkit/__init__.py b/datkit/__init__.py index e0f1e1e..928a943 100644 --- a/datkit/__init__.py +++ b/datkit/__init__.py @@ -22,22 +22,6 @@ ) -# -# Paths -# - -# Datkit root -import os, inspect # noqa -try: - frame = inspect.currentframe() - DIR_DATKIT = os.path.abspath(os.path.dirname(inspect.getfile(frame))) -finally: - # Always manually delete frame - # https://docs.python.org/3/library/inspect.html - del frame -del os, inspect - - # # Imports # From dc0135b3587f5ce6472b8077cb2edcdc9a24c7fb Mon Sep 17 00:00:00 2001 From: Michael Clerx Date: Thu, 9 Apr 2026 19:35:49 +0100 Subject: [PATCH 2/2] Removed unused global variable DIR_TEST --- datkit/tests/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/datkit/tests/__init__.py b/datkit/tests/__init__.py index addc8ed..31f0944 100644 --- a/datkit/tests/__init__.py +++ b/datkit/tests/__init__.py @@ -5,12 +5,8 @@ # This file is part of Datkit. # For copyright, sharing, and licensing, see https://github.com/myokit/datkit/ # -import os import unittest -# The test directory -DIR_TEST = os.path.abspath(os.path.dirname(__file__)) - class TestCase(unittest.TestCase): """ @@ -55,4 +51,4 @@ def assertUnchanged(self, func, *args): self.assertTrue(self.array_args_unchanged(func, *args)) -del os, unittest +del unittest