summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/security_groups
diff options
context:
space:
mode:
authorAkihiro Motoki <amotoki@gmail.com>2018-12-02 06:43:47 +0900
committerAkihiro Motoki <amotoki@gmail.com>2019-01-17 00:44:19 +0900
commit7c585e2643b2363794cc39a62569ef63982a28b7 (patch)
tree24a36e9de1c48a26de7c460a31f93c261beac799 /openstack_dashboard/dashboards/project/security_groups
parentc9536342c22000ad9f8d81d52424b3d3412c29fb (diff)
downloadhorizon-7c585e2643b2363794cc39a62569ef63982a28b7.tar.gz
pylint: fix some refactor recommendations
openstack_dashboard/dashboards/project/security_groups/forms.py:393:13: R1714: Consider merging these comparisons with "in" to "rule_menu in ('tcp', 'udp')" (consider-using-in) openstack_dashboard/api/rest/json_encoder.py:61:15: R0124: Redundant comparison - o != o (comparison-with-itself) openstack_dashboard/api/keystone.py:904:15: R1714: Consider merging these comparisons with "in" to 'default in (role.id, role.name)' (consider-using-in) horizon/templatetags/truncate_filter.py:30:7: R1716: Simplify chained comparison between the operands (chained-comparison) Change-Id: I6cf8602f88c4027ff12aaa4ea5a9f2069ae2e2a6
Diffstat (limited to 'openstack_dashboard/dashboards/project/security_groups')
-rw-r--r--openstack_dashboard/dashboards/project/security_groups/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/security_groups/forms.py b/openstack_dashboard/dashboards/project/security_groups/forms.py
index 58dd2dc4d..4a551178f 100644
--- a/openstack_dashboard/dashboards/project/security_groups/forms.py
+++ b/openstack_dashboard/dashboards/project/security_groups/forms.py
@@ -390,7 +390,7 @@ class AddRule(forms.SelfHandlingForm):
rule_menu = cleaned_data.get('rule_menu')
if rule_menu == 'icmp':
self._clean_rule_icmp(cleaned_data, rule_menu)
- elif rule_menu == 'tcp' or rule_menu == 'udp':
+ elif rule_menu in ('tcp', 'udp'):
self._clean_rule_tcp_udp(cleaned_data, rule_menu)
elif rule_menu == 'custom':
self._clean_rule_custom(cleaned_data, rule_menu)