Skip to content

Commit 409e966

Browse files
committed
refact: add typing to decorator
1 parent de6cecf commit 409e966

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/api/decorator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
from typing import Callable
5+
46

57
class classproperty:
68
""" Decorator for class properties.
79
Use @classproperty instead of @property to add properties
810
to the class object.
911
"""
10-
def __init__(self, fget):
12+
def __init__(self, fget: Callable):
1113
self.fget = fget
1214

1315
def __get__(self, owner_self, owner_cls):

0 commit comments

Comments
 (0)