Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/python/pants/option/native_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
import shlex
from collections.abc import Mapping, Sequence
from enum import Enum
from enum import Enum, EnumType
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -172,8 +172,7 @@ def scope_str() -> str:
return "global scope" if scope == GLOBAL_SCOPE else f"scope '{scope}'"

def is_enum(typ):
# TODO: When we switch to Python 3.11, use: return isinstance(typ, EnumType)
return inspect.isclass(typ) and issubclass(typ, Enum)
return isinstance(typ, EnumType)

def apply_callable(callable_type, val_str):
try:
Expand Down