For comments and docstrings, stick to the Google style guide.
For code formatting, use blue formatter.
For static type checking, use Mypy - each project contains mypy.ini with its settings.
For linting, use Pylint.
Arguments for dc-sonar-user-layer: --max-line-length=119 --disable=too-few-public-methods,import-error,import-outside-toplevel,broad-except,wrong-import-position,duplicate-code --load-plugins pylint_django --django-settings-module=dc_sonar_web.settings.
Arguments for dc-sonar-workers-layer: --max-line-length=119 --disable=too-few-public-methods,import-error,import-outside-toplevel,broad-except,wrong-import-position,duplicate-code.
Arguments for ntlm-scrutinizer: --extension-pkg-whitelist=pydantic --max-line-length=119 --disable=too-few-public-methods,import-error,import-outside-toplevel.
The limit of 79 chars uses for comments and docs.
The limit of 119 chars uses for code.
For formatting code in dc-sonar-fronted, use tsconfig.json located in the repository.
https://www.conventionalcommits.org/en/v1.0.0/.
https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#commit.
Go to File | Settings | Python Interpreter | Add ...:
Choose "Existing environment" then OK:
Go to File | Settings | Python Integrated Tools, choose Docstring format: Google then Apply:
Go to File | Settings | Other Settings | Mypy.
Set the path to Mypy executable: {YOUR_PATH}\{PROJECT}\venv\Scripts\mypy.exe.
Set the path to config file: {YOUR_PATH}\{PROJECT}\mypy.ini.
Apply.
Go to File | Settings | Other Settings | Pylint.
Set the path to Pylint executable: {YOUR_PATH}\{PROJECT}\venv\Scripts\pylint.exe
Arguments: See above.
Apply.
Go to File | Settings | External Tools | Add:
Set the name as Blue Formatter.
Set the description as https://pypi.org/project/blue/.
Set the program as $PyInterpreterDirectory$\blue.exe.
Set the arguments as $FilePath$ --line-length=119.
Set the working directory as $ProjectFileDir$.
Click OK then Apply.
Go to Settings | Keymap | Blue Formatter | Add Keyboard Shortcut
Enter Alt+B click OK then Apply.
Go to Settings | Editor | Language injections.
Disable the setting python:"SQL select/delete/insert/update/create" then click Apply.
Go to Settings | Editor | Code Style.
Set the hard wrap at as 119.
Set the visual guides as 79, 119.
Click Apply.
Use Alt + B to format a .py file.
Use Ctrl + Alt + O to optimize imports in a .py file.








