question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use VS Code's organize import solution

See original GitHub issue

Have the following imports

from __future__ import print_function, division
import math
import numpy as np
import copy
from mlfromscratch.deep_learning.activation_functions import Sigmoid, ReLU, SoftPlus, LeakyReLU
from mlfromscratch.deep_learning.activation_functions import TanH, ELU, SELU, Softmax

Do a context menu > Sort Imports

This is the result. I would expect them just to be sorted, not formated 🐛

from __future__ import division, print_function

import copy
import math

import numpy as np
from mlfromscratch.deep_learning.activation_functions import (ELU, SELU,
                                                              LeakyReLU, ReLU,
                                                              Sigmoid, Softmax,
                                                              SoftPlus, TanH)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
mikerollcommented, Dec 27, 2019

Organize Imports could also be a an option (looking at vscode’s generic source.organizeImports action).

6reactions
luabudcommented, Jan 29, 2020

We should use source.organizeImports to “Organize Imports” instead

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to invoke the "Organize imports" TypeScript feature in ...
Pressing Ctrl + R followed by Ctrl + G . Right-click in the code window and click Organize Imports in the context menu....
Read more >
Easily sort imports and remove unused declarations on each ...
Easily sort imports and remove unused declarations on each save in VS Code. #vscode #eslint #prettier #javascript. All this time I was using...
Read more >
Organize Imports broken in 1.73.0 · Issue #165326 - GitHub
Type: Bug After upgrading VSCode to 1.73.0, the Organize Imports action hangs indefinitely, preventing the editor from closing gracefully.
Read more >
VS Code tips — Organize imports - YouTube
Today's VS Code tip: Organize Imports Use the organize imports command to sort imports and remove unused ones for JavaS … Show more....
Read more >
Python & VS Code: make Black and organize imports work ...
Hello world. What a stable and positive time to be alive! But at least we can fix our code editors. I use Black...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found