H701 Empty localization string
Bug #1351196 reported by
Akihiro Motoki
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Low
|
Akihiro Motoki |
Bug Description
Enabling E701 (Empty localization string) is useful.
In many cases, this type of _(xxx) does not work as expected.
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | juno-3 → 2014.2 |
To post a comment you must log in.
At now, two errors are detected.
$ tox -e pep8 dashboard/ dashboards/ project/ access_ and_security/ security_ groups/ forms.py: 249:31: H701 Empty localization string
common_ rules = [(k, _(rules_ dict[k] ['name' ]))
^ exceptions. py:170: 18: H701 Empty localization string
pep8 develop-inst-noop: /opt/stack/horizon
pep8 runtests: commands[0] | /bin/bash run_tests.sh -N --pep8
Running flake8 ...
./openstack_
./horizon/
return _(self.msg) % self.attrs
^
For the first one, rules_dict comes from local_settings.py SECURITY_ GROUP_RULES. GROUP_RULES use _(xxx) properly, we don't need to use _() here.
If 'name' in each entries of SECURITY_
For the second one, self.msg itself should be translatable.