You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't repro this first one regarding remove unused imports. As long as the cursor is on the same line it just shows up for me. For the extract method one, it's expected to have certain range selected to trigger the code action.
I am on Microsoft Visual Studio Enterprise 2022 (64-bit) - Int Preview
Version 17.11.0 Preview 2.0 [34914.235.main]. Can you verify? @ttSpace
The Quick Action icon for remove unused imports only appear if the code is selected.
For theExtract method one, Only appear if the code is selected. But when I tested 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()
Describe the bug
Steps to Reproduce
Expected behavior
Additional context and screenshots
You must select this line of code for it to appear.
The text was updated successfully, but these errors were encountered: