I am using autopep8
as formatter for python in vscode.
Earlier when I used to save the file, vscode used to autoformat the file and wrap long lines. For example:
results['flagReason'] = results.apply(
lambda x: flagger(x, return_type='reason'), axis=1)
results['flagMessage'] = results.apply(
lambda x: flagger(x, return_type='message'), axis=1)
But what I write (or want) is:
results['flagReason'] = results.apply(lambda x: flagger(x, return_type='reason'), axis=1)
results['flagMessage'] = results.apply(lambda x: flagger(x, return_type='message'), axis=1)
For this, from this answer, I changed the settings of vscode and added the following in settings file:
"python.formatting.autopep8Args": ["--max-line-length", "120", "--experimental"]
The issue is when I try to reformat after adding these settings, the file does not reformat and wrapped lines do not unwrap i.e. does not change to how i want.
Please help...