improve the name of the variable in basic_consolidation.py
Bug #1541615 reported by
Jean-Emile DARTOIS
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
watcher |
Fix Released
|
Low
|
Steve Wilkerson |
Bug Description
Good variable names are:
a) short / easy to type,
b) easy to remember,
c) understandable / communicative.
For example :
replace : s = sorted(score, reverse=True, key=lambda x: (x[1]))
by
sorted_score = sorted(score, reverse=True, key=lambda x: (x[1]))
def calculate_m(self, v, current_model, node_to_release, s):
m = 0
by
def calculate_m(self, sorted_vms, current_model, node_to_release,
summary: |
- improving the name of the variable + improving the name of the variable in basic_consolidation |
Changed in watcher: | |
importance: | Undecided → Critical |
importance: | Critical → Low |
milestone: | none → mitaka-3 |
summary: |
- improving the name of the variable in basic_consolidation + improve the name of the variable in basic_consolidation.py |
description: | updated |
tags: | added: low-hanging-fruit |
Changed in watcher: | |
assignee: | nobody → Steve Wilkerson (sw5822) |
Changed in watcher: | |
status: | New → In Progress |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/276221 /git.openstack. org/cgit/ openstack/ watcher/ commit/ ?id=37dd713ed55 ca89ffe886b9342 69e756e6c28f93
Committed: https:/
Submitter: Jenkins
Branch: master
commit 37dd713ed55ca89 ffe886b934269e7 56e6c28f93
Author: Steve Wilkerson <email address hidden>
Date: Thu Feb 4 07:23:23 2016 -0600
Improve variable names in strategy implementations
Renamed many of the variables and method parameters
in the strategy implementations to make the names
more meaningful. Also changed the abstract method
signature in base.py to reflect these changes.
Closes-Bug: #1541615
Change-Id: Ibeba6c6ef6d5b7 0482930f387b05d 5d650812355