Updating HACKING to disallow the use of locals()
Change-Id: I7bf2720bdb0456274dc81a73d91296dff0e3fced
This commit is contained in:
parent
f30afa6e70
commit
6251df9068
@ -46,6 +46,15 @@ General
|
||||
if not (X in Y or X in Z): # OKAY, still better than all those 'not's
|
||||
pass
|
||||
|
||||
- Do not use locals(). Example::
|
||||
|
||||
LOG.debug(_("volume %(vol_name)s: creating size %(vol_size)sG") %
|
||||
locals()) # BAD
|
||||
|
||||
LOG.debug(_("volume %(vol_name)s: creating size %(vol_size)sG") %
|
||||
{'vol_name': vol_name,
|
||||
'vol_size': vol_size}) # OKAY
|
||||
|
||||
|
||||
Imports
|
||||
-------
|
||||
|
Loading…
Reference in New Issue
Block a user