Hi! I've just created an External Tool instance for isort in PyCharm Professional and checked whether it works or not. Here's a screenshot of my tool's settings.
It turned out that it works smoothly with regular .py scripts, but it doesn't work with .ipynb files (Jupyter notebooks) at all. It might be worth noting that I've also been using the black formatter (see the settings in the screenshot below) together with isort and it works without any problems in .py files.
However, when I run isort in a notebook, it doesn't format imports in the notebook's cells; I just receive the following output:
C:\Users\USERNAME\AppData\Local\Programs\Python\Python310/Scripts/isort file_name.ipynb
Process finished with exit code 0
The only solution I've come across at this point is to use nbQA in the terminal as follows:
nbqa isort file_name.ipynb
In this case, it's possible to format the imports as expected. Could you tell me if it's a bug or not? Would it be better to contact JetBrains, as it might be a problem from their side?
Hi! I've just created an External Tool instance for isort in PyCharm Professional and checked whether it works or not. Here's a screenshot of my tool's settings.![Screenshot_1](https://github.com/PyCQA/isort/assets/31742718/35f866fb-d7c4-4a1b-840a-59c1af766312)
It turned out that it works smoothly with regular![Screenshot_2](https://github.com/PyCQA/isort/assets/31742718/d0cd8f04-7874-441a-abd3-d67415027d1e)
.py
scripts, but it doesn't work with.ipynb
files (Jupyter notebooks) at all. It might be worth noting that I've also been using the black formatter (see the settings in the screenshot below) together with isort and it works without any problems in.py
files.However, when I run isort in a notebook, it doesn't format imports in the notebook's cells; I just receive the following output:
The only solution I've come across at this point is to use nbQA in the terminal as follows:
nbqa isort file_name.ipynb
In this case, it's possible to format the imports as expected. Could you tell me if it's a bug or not? Would it be better to contact JetBrains, as it might be a problem from their side?