-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pylance Syntax Highlighting isnot working or working very slow #6962
Comments
Thanks for the issue. Can you include the logs for pylance as described here? |
code in callback_parser.py: from telethon import TelegramClient
from telethon import events
API_ID = '12'
API_HASH = '12'
print("halo2")
print("\n\n")
print("hmm..\n")
client = TelegramClient('cheba_acc', API_ID, API_HASH)
async def main():
print("Hello, starting bot..")
me = await client.get_me()
print(me.stringify())
username = me.username
print(username)
@client.on(events.NewMessage())
async def handler(event: events.NewMessage.Event):
msg = event.message
if msg.out:
return
print(msg)
with client:
client.loop.run_forever() |
Also log after i commented line:
|
Wow this:
Hopefully it will reproduce for us with the same code. I would hazard a guess whatever the |
but i had no issue month ago, worked with telethon, opencv, and others. but now i have the problem :< |
We do make changes in our underlying type evaluator, one of those could have regressed analysis of telethon. We have limits on searching for types and increasing those so some other package would finish analysis could have potentially caused telethon to take a lot longer. I'm trying to reproduce it right now. |
For me it's not quite as bad:
Oh wait, that's with the comment. Uncommenting the print makes it take a LOT longer. If I turn on perf logging I can see this function is a main culprit:
I tried adding type annotations to that function, but it's still slow. @erictraut do you have any ideas? |
You can try to make it several times and you will see same time as mine, or even longer also it's not only "print" issue, anything i touch in this file takes lot of time to finish |
Wondering if this might be related to my recent changes to add the |
if this was for me, i can't access it :D |
Sorry, no, I was talking to @rchiodo. |
Environment data
Code Snippet
Expected behavior
syntax highlighted fast
Actual behavior
syntax is making same thing but with python, also variables are not correctly highlighted (This gif is from another guy in cpp, but i have same thing with python)

EVEN With code snipped i provided as single file in project folder
Here is some ss:
Also take a look at comment highlighting (screenshot is made after ~ one minute)
Logs
The text was updated successfully, but these errors were encountered: