diff options
Diffstat (limited to 'src/click/core.py')
-rw-r--r-- | src/click/core.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/click/core.py b/src/click/core.py index 0459ccd..a89dab2 100644 --- a/src/click/core.py +++ b/src/click/core.py @@ -1,5 +1,6 @@ import enum import errno +import inspect import os import sys import typing as t @@ -2678,7 +2679,7 @@ class Option(Parameter): default_string = f"({self.show_default})" elif isinstance(default_value, (list, tuple)): default_string = ", ".join(str(d) for d in default_value) - elif callable(default_value): + elif inspect.isfunction(default_value): default_string = _("(dynamic)") elif self.is_bool_flag and self.secondary_opts: # For boolean flags that have distinct True/False opts, |