Open nyudenkov opened 1 year ago
@nyudenkov after and before code snippets looks, exactly same to me. Plz recheck.
Hi @nyudenkov! I was able to reproduce this error like this: File structure
├── check
└── .isort.cfg
└── src
└── socketio
.isort.cfg
[settings]
profile=black
src_paths=src
You are right, it indeed happens because of the local socketio
module.
If I change src_paths
to src_paths=.
then from socketio.exceptions import ConnectionRefusedError
is no longer treated as a local import. May it help you with the issue?
@bp72 I'll check, thank you
Hi @nyudenkov! Just wanted to check in and see if you had a chance to take a look. Did it help you out? Let me know if you need any further assistance!
isort sorts third-party socketio to local imports.
Before:
After:
My guess is that it can be because of the socketio module in the src directory:
In pre-commit config: