Skip to content

Commit cb72982

Browse files
committed
Fix typing
1 parent 07c9f02 commit cb72982

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

meta_package_manager/base.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from click_extra.colorize import default_theme as theme
3737
from click_extra.envvar import env_copy
3838
from click_extra.testing import INDENT, args_cleanup, format_cli_prompt
39-
from extra_platforms import UNIX, Group, current_platforms
39+
from extra_platforms import UNIX, Group, Platform, current_platforms
4040
from packageurl import PackageURL
4141

4242
from .version import TokenizedString, parse_version
@@ -577,9 +577,16 @@ def version(self) -> TokenizedString | None:
577577
@cached_property
578578
def supported(self) -> bool:
579579
"""Is the package manager supported on that platform?"""
580-
# At this point self.platforms is normalized as a frozenset of Platform
581-
# instances.
582-
return len(self.platforms.intersection(current_platforms())) > 0
580+
return (
581+
len(
582+
# XXX At this point self.platforms is normalized as a frozenset of
583+
# Platform instances.
584+
cast("frozenset[Platform]", self.platforms).intersection(
585+
current_platforms()
586+
)
587+
)
588+
> 0
589+
)
583590

584591
@cached_property
585592
def executable(self) -> bool:

0 commit comments

Comments
 (0)