This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
multipub/.pyenv/lib/python3.7/site-packages/pylint/test/functional/monkeypatch_method.py
2019-02-09 02:45:25 -06:00

16 lines
411 B
Python

# pylint: disable=missing-docstring,too-few-public-methods, useless-object-inheritance
'''Test that a function is considered a method when looked up through a class.'''
class Clazz(object):
'test class'
def __init__(self, value):
self.value = value
def func(arg1, arg2):
'function that will be used as a method'
return arg1.value + arg2
Clazz.method = func
VAR = Clazz(1).method(2)