[codeface] Re: [PATCH 2/9] Fix unresolvable variable in cluster.py computeProximityLinks

  • From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
  • To: <codeface@xxxxxxxxxxxxx>, Andreas Ringlstetter <andreas.ringlstetter@xxxxxxxxxxxxxxxxxxxx>, "Joblin, Mitchell (ext)" <mitchell.joblin.ext@xxxxxxxxxxx>
  • Date: Wed, 16 Sep 2015 15:01:10 +0200



Am 15/09/2015 um 03:43 schrieb Andreas Ringlstetter:

From: Andreas Ringlstetter <andreas.ringlstetter@xxxxxxxxx>

Signed-off-by: Andreas Ringlstetter <andreas.ringlstetter@xxxxxxxxx>
---
codeface/cluster/cluster.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/codeface/cluster/cluster.py b/codeface/cluster/cluster.py
index f443090..d363ff3 100755
--- a/codeface/cluster/cluster.py
+++ b/codeface/cluster/cluster.py
@@ -1533,10 +1533,10 @@ def computeProximityLinks(fileCommitList, cmtList,
id_mgr, link_type, \
Collaboration is quantified by a single metric indicating the
strength of collaboration between two individuals.
'''
- for file_commit in fileCommitList.values():
+ for fileCommit in fileCommitList.values():

if speedUp:
- computeSnapshotCollaboration(file_commit, cmtList, id_mgr,
link_type,
+ computeSnapshotCollaboration(fileCommit, cmtList, id_mgr,
link_type,
startDate)

why change only file_commit to fileCommit, but leave everything
else (id_mgr, link_type, ...) as is? Besides, most of the code uses
underscores for variable names, so why switch to camel case in this
particular case?

In general, we should move to a more explicit style guide, for instance
google's:
https://google-styleguide.googlecode.com/svn/trunk/pyguide.html.
Currently, we're just referring to python.org, which
would mean pep0008, but the document does not specify a preferred
way of naming variables as far as I'm aware of. The google guide
does. Thoughts on this, anyone?

Best regards, Wolfgang Mauerer

else:
[computeSnapshotCollaboration(fileSnapShot[1], [fileSnapShot[0]],


Other related posts: