According to the docs,
PyCharm adheres to PEP8 rules and requirements for arranging and formatting Python code.
From how I understand it, there is still some flexibility under pep8.
For example, the default formatter on Pycharm allows for use of single or double quotes on strings and does not require that to be consistent in the code.
Whereas, Black is very specific to expect double quotes on strings across all files unless configured otherwise.
I presume Pycharm's default IDE python formatter will make the minimum changes necessary to fulfill pep8 and the exact behavior is determined by the individual's coding preferences.
Answer from Rob on Stack OverflowPractical way to format python code in pycharm?
How to use linters and code formatter in PyCharm IDE with pyproject.toml configuration file
intellij idea - How to get the same Python code formatting with PyCharm and Vim? - Stack Overflow
What are your favorite PyCharm plugins?
Videos
I am having trouble with formatting a dir of python code with a certain standard style. Are there any good tools and/or plugins in PyCharm that work?
I have created a project using cookiecutter-django. In the root of the project, there is a file named pyproject.toml, it has some configs, among these configs there are linters and black (a code formatter) configs.
However, I am unsure how to configure these linters and code formatter in PyCharm using the pyproject.toml file. I'm not sure if I have to create a separate configuration file for each of these tools or if they can work together within the same file.
I'm wondering if there is a way to set up the Pycharm IDE to use these configs so that every time I save a file I get my code linted and formatted.
Could someone share their knowledge or experience in using these tools in PyCharm?
Thank you in advance for any help you can provide!