Open chamaoskurumi opened 10 months ago
We should check these out https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
VSCode extensions needed
ms-python.python
(includes Pylance as language server. inwt-smart-execute has Python as a dependency anyway, but we want to make it explicit)ms-toolsai.jupyter
(also dependency, but we make it explicit)jaakko.black
(auto-formatting)~ I realized ruff can also do formatting and if that works fine, we don't need black anymore...so one dependency lesscharliermarsh.ruff
(linting - replaces isort, flake8, etc... according to here)ms-python.mypy-type-checker
~ (typechecking) Can be handled by Pylance (pyright) which is automatically installed as language server. I simply enabled the capability via the configuration. It is also faster and works out of the box. When there are no type annotations, pyright is doing type inference to some extend, which will give you hints none the less (different to mypy which always assumes ANY if annotations are missing)stkb.rewrap
(comment rewrapping, not yet implemented in ruff but maybe soon)njpwerner.autodocstring
(creates nice docstrings for functions and classes via TAB)donjayamanne.python-environment-manager
inwtlab.python-smart-execute
KevinRose.vsc-python-indent
Settings
I removed the smart execute logic and also most of the extensions from the bundle. When we start to configure ruff, black and so on, we have to check if this is now possible using configurationDefaults:
Maybe with this we do not need to create a settings.json after all.
Also we now have a gh action to publish the extension. This happens as soon as we create a tag on gh.
I added python-indent KevinRose.vsc-python-indent
to the list above
Did a first release. Had to strip some more configuration to get there. But also verified the gh action works: https://marketplace.visualstudio.com/items?itemName=inwtlab.inwt-python-ide-v2
@chamaoskurumi do we actually need python-indent when we autoformat at the same time?
Well I trusted the author of python-indent when he says
But tbh I didn't try it out, maybe this information is outdated and python-indent is not needed.
Besides, I tried to updated the npm packages in this branch, but unfortunately it created all sorts of problems. We either accept that we work with (very) old package versions or we need to update one by one to see how far we get without breaking things.
Besides, I tried to updated the npm packages in this branch, but unfortunately it created all sorts of problems. We either accept that we work with (very) old package versions or we need to update one by one to see how far we get without breaking things.
Since they are only relevant for development and we do not need them for the extension, I would leave them as they are. If you want to follow that road, I would start from scratch, following https://code.visualstudio.com/api/get-started/your-first-extension for an extension pack, and simply update/copy the contents from the package.json.
Well I trusted the author of python-indent when he says
I went through some of the examples and I think with autoformatting, there is not much you gain. Also some of the mentioned tickets are closed, because they have become part of pylance and got implemented.
@wahani I guess we can close this issue, since all relevant python extensions were included in the inwt Python IDE v2 already, right? (I'm referring to these extensions here )
I think the doc string extension is missing.