Understanding the Salt Style Guide
If you've spent enough time in Python, then you're already familiar with the Style Guide for Python Code, also known as PEP 8. For those who have not seen it, or if you need a refresher, you can take a look at it here:
https://www.python.org/dev/peps/pep-0008/
There is also a guide to the Salt Coding Style, available at:
https://docs.saltstack.com/en/latest/topics/development/conventions/style.html
In general, Salt coding conventions follow PEP 8, but there are some key differences:
- Quoting: One of the first conventions that new developers come across is that Salt uses single quotes (') instead of double quotes ("). This applies to everything from string formatting to docstrings.
- Line length: It is very common for code to restrict lines to no longer than 80 characters. This seems to be especially adhered to in Python, but it is based on an older convention where computer screens were exactly 80 characters wide. Because this is no longer...