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
You should not have to install black in your environment. Try this for example:
Create a python file with following content:
importunittestimportreclassTestSum(unittest.TestCase):
deftest_sum(self):
self.assertEqual(sum([1, 2, 3]), 6, "Should be 6")
deftest_sum_tuple(self):
self.assertEqual(sum((1, 2, 3)), 6, "Should be 6")
if__name__=="__main__":
unittest.main()
print(x)
Right click in the document and select "Format Document With ...":
You should see two formatters, Select "autopep8":
That is it! If you want this to happen automatically, set Black as the default formatter, and enable format on save. Then on save the content will be formatted.
If you run into any problems, you should be able to see logs under Output > autopep8.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Refs: #19654
Complexity: 1
Create Issue
Requirements
Install the following extension: https://github.com/microsoft/vscode-autopep8/suites/8479132203/artifacts/376874338
NOTE: Currently only pre-release version in available.
Verification
You should not have to install
black
in your environment. Try this for example:Create a python file with following content:
Right click in the document and select "Format Document With ...":

You should see two formatters, Select "autopep8":
That is it! If you want this to happen automatically, set Black as the default formatter, and enable format on save. Then on save the content will be formatted.
If you run into any problems, you should be able to see logs under Output > autopep8.
The text was updated successfully, but these errors were encountered: