diff --git a/copier/cli.py b/copier/cli.py index 1942ce517..10e3a178f 100644 --- a/copier/cli.py +++ b/copier/cli.py @@ -84,7 +84,10 @@ def inner(*args: P.args, **kwargs: P.kwargs) -> int: return 0b100 # See https://github.com/copier-org/copier/pull/1513 - inner.__signature__ = inspect.signature(method, eval_str=True) # type: ignore[attr-defined] + if sys.version_info >= (3, 10): + inner.__signature__ = inspect.signature(method, eval_str=True) # type: ignore[attr-defined] + else: + inner.__signature__ = inspect.signature(method) # type: ignore[attr-defined] return inner