mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add section to style guide
A brief discussion of variable naming standards in Salt.
This commit is contained in:
parent
b3e3bebef0
commit
52e650aed9
1 changed files with 15 additions and 1 deletions
|
@ -28,6 +28,20 @@ pylint_ program as follows:
|
|||
|
||||
.. _pylint: http://www.pylint.org
|
||||
|
||||
Variables
|
||||
=========
|
||||
|
||||
Variables should be a minimum of three characters and should provide an
|
||||
easy-to-understand name of the object being represented.
|
||||
|
||||
When keys and values are iterated over, descriptive names should be used
|
||||
to represent the temporary variables.
|
||||
|
||||
Multi-word variables should be separated by an underscore.
|
||||
|
||||
Variables which are two-letter words should have an underscore appended
|
||||
to them to pad them to three characters.
|
||||
|
||||
Strings
|
||||
=======
|
||||
|
||||
|
@ -332,4 +346,4 @@ commit, and the changes should be legitimate, if there are any questions about
|
|||
whether a style change is legitimate please reference this document and the
|
||||
official PEP 8 (http://legacy.python.org/dev/peps/pep-0008/) document before
|
||||
changing code. Many claims that a change is PEP 8 have been invalid, please
|
||||
double check before committing fixes.
|
||||
double check before committing fixes.
|
||||
|
|
Loading…
Add table
Reference in a new issue