Return a tuple from get_buildsystem.

This commit is contained in:
Jelmer Vernooij 2021-03-19 17:09:38 +00:00
parent 57746c8352
commit 3d0519d83e

View file

@ -20,7 +20,7 @@
import logging
import os
import re
from typing import Optional
from typing import Optional, Tuple
import warnings
from . import shebang_binary, UnidentifiedError
@ -1031,8 +1031,8 @@ def detect_buildsystems(path):
yield bs
def get_buildsystem(path):
for buildsystem in detect_buildsystems(path):
return buildsystem
def get_buildsystem(path: str) -> Tuple[str, BuildSystem]:
for subpath, buildsystem in scan_buildsystems(path):
return subpath, buildsystem
raise NoBuildToolsFound()