diff --git a/src/python/pants/option/native_options.py b/src/python/pants/option/native_options.py index 38c3b0394cb..e9077694c01 100644 --- a/src/python/pants/option/native_options.py +++ b/src/python/pants/option/native_options.py @@ -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 @@ -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: