PyCharm [Intellij] auto-import from Binary Skeletons instead of standard python library
Question:
I’m trying to import Decimal from decimal
but when I try and do this using Intellij it just says I can import from _decimal
instead which is in the Binary Skeletons.
I’m using Poetry and Python 3.10, and it’s almost certainly something wrong with my setup, I just can’t work out what.
Answers:
Not the answer you may expect but…
Use bare import
import decimal
decimal.Decimal
I stopped relying on Pycharm for auto import mainly because of this. This issue exist since years. I don’t use Poetry.
Same issue with, for example, Sequence
.
Here (python 3.11 used), Sequence
is deprecated but accessible in typing
and located in collections.abc
, but Pycharm keep trying to import it from typing
.
knowned issue
I’m trying to import Decimal from decimal
but when I try and do this using Intellij it just says I can import from _decimal
instead which is in the Binary Skeletons.
I’m using Poetry and Python 3.10, and it’s almost certainly something wrong with my setup, I just can’t work out what.
Not the answer you may expect but…
Use bare import
import decimal
decimal.Decimal
I stopped relying on Pycharm for auto import mainly because of this. This issue exist since years. I don’t use Poetry.
Same issue with, for example, Sequence
.
Here (python 3.11 used), Sequence
is deprecated but accessible in typing
and located in collections.abc
, but Pycharm keep trying to import it from typing
.