Integral type expected: tooltip like Python 3.5 and Pycharm

How are custom classes created that should be denoted in a Python 3.5 type?

from typing import List
from debt import Debt

class Debts:
    def __init__(self, debts: List[Debt]): # Expected Integral type
        self.overall = debts

I know typing.TypeVar, but PyCharm gives me the same error for this as well. What am I missing?

+4
source share
1 answer

PyCharm 5 apparently comes with full hint support like Python 3.5.

+1
source

Source: https://habr.com/ru/post/1599788/


All Articles