E
E
estry2021-10-23 21:00:34
Python
estry, 2021-10-23 21:00:34

How to specify a Python data type?

Hello. How to specify the data type for hints to appear in python? Well, so that pycharm does not highlight the code.
p6dZyuc.png
I get a list and I know that this is a pyrogram.types.Message object. How can I tell pycharm to see tooltips?
The code:

app = Client("D:/1234156.session")
app.start()

for dialog in app.get_history('channels'):
    pass

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-23
@Vindicar

If you need to specify types in your code - use type hints .
If you need in someone else's - find / write stub-files .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question