r86535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86534‎ | r86535 | r86536 >
Date:19:44, 20 April 2011
Author:diederik
Status:deferred
Tags:
Comment:
renamed id to editor_id
Modified paths:
  • /trunk/tools/editor_trends/etl/transformer.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/transformer.py
@@ -49,7 +49,7 @@
5050
5151 class Editor:
5252 def __init__(self, editor_id, db_raw, db_dataset, **kwargs):
53 - self.id = editor_id
 53+ self.editor_id = editor_id
5454 self.db_raw = db_raw
5555 self.db_dataset = db_dataset
5656 for kw in kwargs:
@@ -60,7 +60,7 @@
6161
6262 def __call__(self):
6363 cutoff = 9
64 - editor = self.db_raw.find_one('editor', self.id)
 64+ editor = self.db_raw.find_one('editor', self.editor_id)
6565 if editor == None:
6666 return
6767 edits = editor['edits']
@@ -94,7 +94,7 @@
9595 first_edit = edits[0]['date']
9696 final_edit = edits[-1]['date']
9797
98 - data = {'editor': self.id,
 98+ data = {'editor': self.editor_id,
9999 'username': username,
100100 'new_wikipedian': new_wikipedian,
101101 'cum_edit_count': cum_edit_count,