diff --git a/src/in_n_out/_type_resolution.py b/src/in_n_out/_type_resolution.py index fdcf85f..44b3ba1 100644 --- a/src/in_n_out/_type_resolution.py +++ b/src/in_n_out/_type_resolution.py @@ -149,7 +149,7 @@ class method. This is done as follows: """ sig = Signature.from_callable(func) hints = {} - if guess_self: + if guess_self and sig.parameters: p0 = next(iter(sig.parameters.values())) # The best identifier i can figure for a class method is that: # 1. its qualname contains a period (e.g. "MyClass.my_method"),