VS Code Python extenstion auto-import imports hook instead of src.hook

Viewed 95

I accidentaly clicked a message that I want to add src to path or something pretty similar and after this action everytime when I there is an auto-import of a module it imports the module but without src (in my example).

Example:

dir: src/

file: hook.py

function: send_message_via_webhook

When I start to type send - auto-import sees send_message_via_webhook which is fine BUT the path is from hook import send_message_via_webhook instead of from src.hook import send_message_via_webhook.

Can anyone please help me? It's driving me crazy and I can't find anything to help me.

Thanks a lot!

1 Answers

Okay I think I found the issue. I made 2 changes. First I deleted the added item in Python › Analysis: Extra Paths - there was src that I (probably) added. And then I unchecked Python › Analysis: Auto Search Paths. That made the difference.

Related