0

I just started using TabNine for python in VS Code. It makes some great suggestions. However, it always uses double quotes for the string constants. For me this is irksome. All the other code in my project is using single quotes. Is there a way to tell the AI to please use single quotes for strings?

John Henckel
  • 10,274
  • 3
  • 79
  • 79
  • I guess you always [run](https://pypi.org/project/black) `$ black -S .` instead of `$ black .` ? – J_H May 25 '23 at 23:23
  • Did you use black for formatting? [Document](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#strings) shows that Black prefers double quotes (" and """) over single quotes (' and '''). – MingJie-MSFT May 26 '23 at 01:50
  • @MingJie-MSFT no i don't use black. i prefer single quotes. If you look at PEP8, all the examples also prefer single quotes.... https://peps.python.org/pep-0008/ I think it is weird that TabNine always generates double quotes. Perhaps I should just use Black -S and it would be a non-issue – John Henckel May 26 '23 at 15:48

0 Answers0