funcsigs.signature() treats unbound methods as any other method, despite m.self being None.
The attached pull requests adds a test case and fix. I've used a positional-only parameter because of this behaviour:
>>> class Test(object):
... def method(self, *args, **kwargs):
... return self, args, kwargs
...
>>> Test.method(Test())
(<__main__.Test object at 0x2c9fad0>, (), {})
>>> Test.method(self=Test())
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: unbound method method() must be called with Test instance as first argument
(got nothing instead)
funcsigs.signature() treats unbound methods as any other method, despite m.self being None.
The attached pull requests adds a test case and fix. I've used a positional-only parameter because of this behaviour: