Don't use '_'

'_' has different meanings in different
projects, so avoid its usage. Some use
it for gettext functionality, some don't
so lets just stick with not using it at
all.

Change-Id: Id241bd2e17e01ff724848961520b82eea7cfdecc
This commit is contained in:
Joshua Harlow 2013-08-14 23:11:10 -07:00
parent 3437d73269
commit 3f2322e153
2 changed files with 6 additions and 4 deletions

View File

@ -47,17 +47,19 @@ Documentation should all be written in [markdown] or [rst]. Although github does
1. Do not write "except:", use "except Exception:" at the very least
1. Include your name with TODOs as in "#TODO(termie)"
1. Do not name anything the same name as a built-in or reserved word
1. Do not use the '_' as a single character variable as it is used with
the [gettext] module and can lead to confusion if used for other purposes.
### Imports
1. Do not import objects, only modules
1. Do not import objects, only modules (not strictly enforced)
1. Do not import more than one module per line
1. Do not make relative imports
1. Order your imports by the full module path
1. Organize your imports in lexical order (TBD)
1. Organize your imports in lexical order
[gettext]: http://docs.python.org/2/library/gettext.html
[CLI Auth]: http://wiki.openstack.org/CLIAuth
[yaml]: http://en.wikipedia.org/wiki/YAML
[pep8]: http://www.python.org/dev/peps/pep-0008/

View File

@ -663,7 +663,7 @@ class YumDependencyHandler(base.DependencyHandler):
req = None
rpm_name = None
try:
(rpm_name, _) = self._get_template_and_rpm_name(inst)
(rpm_name, _tpl) = self._get_template_and_rpm_name(inst)
req = inst.egg_info['req']
except AttributeError:
pass