File: get_unbound_function.py

package info (click to toggle)
python-graphene 2.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,024 kB
  • sloc: python: 7,295; makefile: 196; sh: 4
file content (4 lines) | stat: -rw-r--r-- 121 bytes parent folder | download | duplicates (2)
1
2
3
4
def get_unbound_function(func):
    if not getattr(func, "__self__", True):
        return func.__func__
    return func