Skip to content

Commit

Permalink
Better name for the metaclass
Browse files Browse the repository at this point in the history
  • Loading branch information
boydgreenfield committed May 17, 2024
1 parent 6cf8b6e commit b8168e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions instructor/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import warnings


class _RaiseOnFunctionsAccessEnumMeta(enum.EnumMeta):
class _WarnOnFunctionsAccessEnumMeta(enum.EnumMeta):
def __getattribute__(cls, name):
if name == "FUNCTIONS":
warnings.warn(
Expand All @@ -13,7 +13,7 @@ def __getattribute__(cls, name):
return super().__getattribute__(name)


class Mode(enum.Enum, metaclass=_RaiseOnFunctionsAccessEnumMeta):
class Mode(enum.Enum, metaclass=_WarnOnFunctionsAccessEnumMeta):
"""The mode to use for patching the client"""

FUNCTIONS = "function_call"
Expand Down

0 comments on commit b8168e5

Please sign in to comment.