Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrik committed May 30, 2024
1 parent 43aedad commit dcc3e63
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rez/cli/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'''
Run a benchmarking suite for runtime resolves.
'''
from __future__ import annotations
from __future__ import annotations

import json
import os
Expand Down
1 change: 0 additions & 1 deletion src/rez/package_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from rez.version import Version
from contextlib import contextmanager
import os
from typing import Iterable


# this schema will automatically harden request strings like 'python-*'; see
Expand Down
1 change: 0 additions & 1 deletion src/rez/package_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
if TYPE_CHECKING:
from rez.package_resources import (PackageFamilyResource, PackageResource, PackageResourceHelper,
VariantResource, PackageRepositoryResource)
from rez.packages import Package
from rez.utils.resources import Resource
from rez.version import Version
from rezplugins.package_repository.memory import MemoryPackageRepository
Expand Down
2 changes: 1 addition & 1 deletion src/rez/package_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from types import FunctionType, MethodType

if TYPE_CHECKING:
from rez.packages import Package, Variant
from rez.packages import Variant


# package attributes created at release time
Expand Down
12 changes: 9 additions & 3 deletions src/rez/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,16 +918,22 @@ def get_completions(prefix: str, paths: list[str] | None = None, family_only=Fal


@overload
def get_latest_package(name: str, *, range_=None, paths: list[str] | None = None, error: Literal[True] = True) -> Package:
def get_latest_package(name: str, *, range_=None,
paths: list[str] | None = None,
error: Literal[True] = True) -> Package:
pass


@overload
def get_latest_package(name: str, *, range_=None, paths: list[str] | None = None, error: Literal[False] = False) -> Package | None:
def get_latest_package(name: str, *, range_=None,
paths: list[str] | None = None,
error: Literal[False] = False) -> Package | None:
pass


def get_latest_package(name: str, *, range_=None, paths: list[str] | None = None, error: bool = False) -> Package | None:
def get_latest_package(name: str, *, range_=None,
paths: list[str] | None = None,
error: bool = False) -> Package | None:
"""Get the latest package for a given package name.
Args:
Expand Down
2 changes: 2 additions & 0 deletions src/rezplugins/build_system/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""
Package-defined build command
"""
from __future__ import annotations

from shlex import quote
from typing import TYPE_CHECKING
import functools
Expand Down

0 comments on commit dcc3e63

Please sign in to comment.