PTVS
PTVS copied to clipboard
The "remove unused imports" and "Extract method" quick action icons appear only when you select a code.
Describe the bug
Steps to Reproduce
- Create a Python Application project
- Input some code
import array; import glob; import math
print(math.cos(10))
- Move the cursor to a one line
- The Quick Action icon should appear in front of this line.
Expected behavior
Additional context and screenshots
You must select this line of code for it to appear.
For the Extract method
one, I tested on another code, the icon did not appear when selecting a single line or more than a single line.
Sample Code
from math import cos, radians
# Create a string with spaces proportional to a cosine of x in degrees
def make_dot_string(x):
rad = radians(x) # cos works with radians
numspaces = int(20 * cos(radians(x)) + 20) # scale to 0-40 spaces
st = ' ' * numspaces + 'o' # place 'o' after the spaces
return st
def main():
for i in range(0, 1800, 12):
s = make_dot_string(i)
print(s)
main()