From 3f8b419609f7b776cff61267fcf6323054bf260c Mon Sep 17 00:00:00 2001 From: rdimaio Date: Tue, 17 Sep 2024 13:20:57 +0200 Subject: [PATCH] Testing: Remove unused RSEDeterministicTranslationT --- lib/rucio/common/plugins.py | 5 ++--- lib/rucio/rse/translation.py | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/rucio/common/plugins.py b/lib/rucio/common/plugins.py index c4733b3ca7..3a7b350917 100644 --- a/lib/rucio/common/plugins.py +++ b/lib/rucio/common/plugins.py @@ -26,11 +26,10 @@ if TYPE_CHECKING: from collections.abc import Callable -PolicyPackageAlgorithmsT = TypeVar('PolicyPackageAlgorithmsT', bound='PolicyPackageAlgorithms') - -if TYPE_CHECKING: from rucio.common.types import LoggerFunction +PolicyPackageAlgorithmsT = TypeVar('PolicyPackageAlgorithmsT', bound='PolicyPackageAlgorithms') + def check_policy_package_version(package: str, logger: 'LoggerFunction' = logging.log) -> None: diff --git a/lib/rucio/rse/translation.py b/lib/rucio/rse/translation.py index 898a48a57a..9e97d5a748 100644 --- a/lib/rucio/rse/translation.py +++ b/lib/rucio/rse/translation.py @@ -14,7 +14,7 @@ import hashlib import logging from configparser import NoOptionError, NoSectionError -from typing import TYPE_CHECKING, Any, Optional, TypeVar +from typing import TYPE_CHECKING, Any, Optional from rucio.common import config from rucio.common.constants import RseAttr @@ -23,6 +23,7 @@ if TYPE_CHECKING: from collections.abc import Callable, Mapping + class RSEDeterministicScopeTranslation(PolicyPackageAlgorithms): """ Translates a pfn dictionary into a scope and name @@ -109,9 +110,6 @@ def _atlas(parsed_pfn: 'Mapping[str, str]') -> tuple[str, str]: RSEDeterministicScopeTranslation() -RSEDeterministicTranslationT = TypeVar('RSEDeterministicTranslationT', bound='RSEDeterministicTranslation') - - class RSEDeterministicTranslation(PolicyPackageAlgorithms): """ Execute the logic for translating a LFN to a path.