VSCode extension to sort and refactor python imports using reorder-python-imports.

Overview

reorder-python-imports

VSCode extension to sort and refactor python imports using reorder-python-imports.

Unlike other import organizers, reorder-python-imports focuses on reducing the frequency of merge conflicts, using static analysis to avoid the need for an active venv, and providing better better compatibility with pre-commit and black.

To learn more, visit the original tool's homepage.

Features

Refactoring the imports is provided as a code action, which can be invoked by right clicking on the code or the lightbulb icon and selecting Reorder Imports, or selecting Python Refactor: Reorder Imports from the command palette.

Example usage from context menu

Settings

Below is an example of a settings.json file with settings relevant to vscode-reorder-python-imports.

{
    "reorder-python-imports.args": [
        "--application-directories=.:src",
        "--add-import 'from __future__ import absolute_import'",
        "--add-import 'from __future__ import division'",
        "--add-import 'from __future__ import print_function'"
  ]
}

Reordering on Save

Reordering imports on save is also supported, but requires you to set the following in your settings to prevent Microsoft's python extension from running isort:

"[python]": {
    "editor.codeActionsOnSave": {
        "source.organizeImports": false,
        "source.organizeImports.reorder-python-imports": true
    },
}

Requirements

reorder-python-imports must be installed in the venv used by visual studio.

Known Issues

isort from Microsoft's Python Extension also provides a code action for organizing imports. When vscode is configured to organize imports on save, both isort and reorder-python-imports are run. To work around this, see the reordering on save section.

Release Notes

v0.1.0

Added support and documentation for reordering on save. First feature-complete release.

v0.0.1

Initial version with minimal required features - provided context menu and command through which the code action can be run.

A Sublime Text package that allows a user to view all the available core/plugin commands for Sublime Text and Sublime Merge, along with their documentation/source.

CommandsBrowser A Sublime Text package that allows a user to view all the available core/plugin commands for Sublime Text and Sublime Merge, along wit

Sublime Instincts 26 Nov 15, 2022
Python 3 patcher for Sublime Text v4107-4114 Windows x64

sublime-text-4-patcher Python 3 patcher for Sublime Text v4107-4114 Windows x64 Credits for signatures and patching logic goes to https://github.com/l

187 Dec 27, 2022
A GitHub Action hosted Python IDE!

What is this ? This is an IDE running on GitHub Actions which can help in..... Running small snippets. Running codes whenever PC is not available and

Jainam Oswal 21 Nov 09, 2022
Multi-user server for Jupyter notebooks

Technical Overview | Installation | Configuration | Docker | Contributing | License | Help and Resources Please note that this repository is participa

JupyterHub 7k Jan 02, 2023
Integrate clang-format with Sublime Text

Sublime Text Clang Format Plugin This is a minimal plugin integrating clang-format with Sublime Text, with emphasis on the word minimal. It is not rea

Jon Palmisciano 1 Dec 17, 2021
VSCode Development Container Template

VSCode Development Container Template This template enables you to use a full-fledged containerized development environment for your machine learning

Paige Bailey 10 Oct 10, 2022
Gaphor is a UML and SysML modeling application written in Python.

Gaphor is a UML and SysML modeling application written in Python. It is designed to be easy to use, while still being powerful. Gaphor implements a fully-compliant UML 2 data model, so it is much mor

Gaphor 1.3k Jan 07, 2023
A way to integrate Latex, VSCode, and Inkscape in macOS. Adopted the whole workflow from Gilles Castel.

VSCode-LaTeX-Inkscape A way to integrate LaTeX, VSCode, and Inkscape in macOS Abstract I use LaTeX heavily in past two years for both academic work an

Pingbang Hu 62 Dec 14, 2022
pyiron - an integrated development environment (IDE) for computational materials science.

pyiron pyiron - an integrated development environment (IDE) for computational materials science. It combines several tools in a common platform: Atomi

pyiron 20 Dec 22, 2022
notebookJS: seamless JavaScript integration in Python Notebooks

notebookJS enables the execution of custom JavaScript code in Python Notebooks (Jupyter Notebook and Google Colab). This Python library can be useful for implementing and reusing interactive Data Vis

jorgehpo 146 Dec 07, 2022
A comfy custom IDE where you can feel right at home

reZIDE a comfy custom IDE where you can feel right at home 🏡 Use simple, declarative configuration files to create complex IDEs with a single command

Zach 7 Jan 26, 2022
Spyder - The Scientific Python Development Environment

Spyder is a powerful scientific environment written in Python, for Python, and designed by and for scientists, engineers and data analysts. It offers a unique combination of the advanced editing, ana

Spyder IDE 7.3k Jan 08, 2023
CTO (Call Tree Overviewer) is an IDA plugin for creating a simple and efficiant function call tree graph

CTO (Call Tree Overviewer) CTO (Call Tree Overviewer) is an IDA plugin for creating a simple and efficiant function call tree graph. It can also summa

Hiroshi Suzuki 257 Dec 24, 2022
Shows Odin Lang errors in Sublime Text.

OdinErrors Shows Odin Lang errors in Sublime Text. Config Collections and defines are stored in ols.json (Hijacked from ols). { "collections": [

Gus 3 Nov 20, 2021
Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser

Live Coding in Python Visualize your Python code while you type it in PyCharm, Emacs, Sublime Text, or even your browser. To see how to use one of the

Don Kirkby 256 Dec 14, 2022
Clarity mode is a single-notebook interface built with existing JupyterLab components.

JupyterLab Clarity Mode Clarity mode is a single-notebook interface built with existing JupyterLab components. To install: Clone this repository Ensur

10 Jul 20, 2022
This is a backend for VCode Editor for saving & retriving data.

This is a backend for VCode Editor for saving & retriving data through the API.

Tejas Magade 1 Nov 22, 2021
Kite IntelliJ plugin

Handbook Supported platforms The Kite plugin supports the following environments: PyCharm Community PyCharm Professional IntelliJ Community with the P

Kite 57 Dec 23, 2022
Mu - A Simple Python Code Editor

A small, simple editor for beginner Python programmers. Written in Python and Qt5.

Mu 1.2k Jan 03, 2023
This is code for IDLE python/ Magic8Ball Code

Magic8Ball this is code for IDLE python/ Magic8Ball Code this code is for beginers i hope you can learn code form this don't ever be a script kiddie a

1 Nov 05, 2021