blob: e2db9479154b1daad3c18eb5bd3445f9895e37a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
"""Test to see we don't crash on this code in pandas.
See: https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/period.py
Reported in https://github.com/PyCQA/pylint/issues/5382
"""
# pylint: disable=missing-function-docstring, missing-class-docstring, no-self-use, unused-argument
# pylint: disable=too-few-public-methods, no-method-argument, invalid-name
def my_decorator(*params):
def decorator(decorated):
return decorated
return decorator
class ClassWithProperty:
def f():
return "string"
f.__name__ = "name"
f.__doc__ = "docstring"
hour = property(f)
class ClassWithDecorator:
@my_decorator(ClassWithProperty.hour.fget)
def my_property(self) -> str:
return "a string"
|