Code review comment for lp:~diegosarmentero/ubuntuone-client/ipcmenu

Revision history for this message
Alejandro J. Cura (alecu) wrote :

19 + return {RECENT_TRANSFERS: (), UPLOADING: ()}

123 + {UPLOADING: expected, RECENT_TRANSFERS: ()})

133 + {UPLOADING: expected, RECENT_TRANSFERS: ()})

All of this should be empty lists, not tuples.
Both in Python and DBus, lists are used to signify collections of homogeneous items, while tuples or dbus.Structs are used for collections of heterogeneous items, so it makes better sense to use lists there.

---

162 +
163 + This method return the following structure:
164 + {
165 + 'recent-transfers': (str),
166 + 'uploading': (str, int, int)
167 + }

This notation does not imply that each of those are lists, and also the doc is not explicit about the contents of each field. Please replace with something like this:

"""
This method returns a dictionary, with the following keys and values:

Key: 'recent-transfers'
Value: a list of strings, each being the name of a file that was recently transferred.

Key: 'uploading'
Value: a list of tuples, with each tuple having the following items:
 * str: the name of a file that's currently being uploaded
 * int: ???
 * int: ???
"""

---

review: Needs Fixing

« Back to merge proposal