summaryrefslogtreecommitdiff
path: root/lib/spack/spack/version/lookup.py
blob: e33b5c217691ac6322632290df1cec5fd5603eba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from typing import Optional, Tuple


class AbstractRefLookup:
    def get(self, ref) -> Tuple[Optional[str], int]:
        """Get the version string and distance for a given git ref.

        Args:
            ref (str): git ref to lookup

        Returns: optional version string and distance"""
        return None, 0