Merge lp://staging/~mblayman/entertainer/complain-fixme-todo into lp://staging/entertainer

Proposed by Matt Layman
Status: Merged
Approved by: Paul Hummer
Approved revision: 380
Merged at revision: not available
Proposed branch: lp://staging/~mblayman/entertainer/complain-fixme-todo
Merge into: lp://staging/entertainer
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~mblayman/entertainer/complain-fixme-todo
Reviewer Review Type Date Requested Status
Paul Hummer Approve
Review via email: mp+6389@code.staging.launchpad.net

Commit message

pylint now complains about TODOs in the code.

To post a comment you must log in.
Revision history for this message
Matt Layman (mblayman) wrote :

This branch enables checking for TODO comments (we are already checking for FIXME). Because of that, I've also deleted all the TODO lines that were still in the code. I have provided a rationale for removal of each TODO in my commit messages so `bzr log -l <7 or 8>` should explain all my reasoning. Only one TODO was appropriate to convert to XXX. I have reported a bug to go with that XXX (Bug 374326).

This branch will help weed out any TODOs in the future and close Bug 311272.

Revision history for this message
Paul Hummer (rockstar) wrote :

 review approve
 status approved

Thanks for the branch!

--
Paul Hummer
http://theironlion.net
1024/862FF08F C921 E962 58F8 5547 6723 0E8C 1C4D 8AC5 862F F08F

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/frontend/gui/screens/photo.py'
2--- entertainerlib/frontend/gui/screens/photo.py 2009-04-27 03:32:30 +0000
3+++ entertainerlib/frontend/gui/screens/photo.py 2009-05-10 02:30:05 +0000
4@@ -79,7 +79,6 @@
5 @param texture: Texture to scale
6 @param zoom_level: Zoom level - Default value is 1 (no zoom)
7 """
8- # TODO: Zoom feature is not implemented completely!
9 # Center position when zoomed
10 width = texture.get_width()
11 height = texture.get_height()
12
13=== modified file 'entertainerlib/frontend/gui/tabs/lyrics_tab.py'
14--- entertainerlib/frontend/gui/tabs/lyrics_tab.py 2009-04-21 21:04:56 +0000
15+++ entertainerlib/frontend/gui/tabs/lyrics_tab.py 2009-05-10 02:41:26 +0000
16@@ -49,7 +49,6 @@
17 This function is called when lyrics search is over.
18 @param lyrics: Lyrics or None if lyrics weren't found
19 """
20- #TODO: We could smoothly fade away throbber
21 self.throbber.hide()
22
23 # Save the results to help determine if the tab can activate
24
25=== modified file 'entertainerlib/frontend/gui/widgets/grid_menu.py'
26--- entertainerlib/frontend/gui/widgets/grid_menu.py 2009-02-08 08:44:46 +0000
27+++ entertainerlib/frontend/gui/widgets/grid_menu.py 2009-05-10 02:31:34 +0000
28@@ -14,13 +14,6 @@
29 scrollable, multirow menus. Real menus should inherit this class
30 and override few methods.
31 """
32- #TODO:
33- # - Scroll content over (first item comes after the last one)
34- # - Fix animated cursor/content move (do we even want this?)
35- # - Add support for PageUp/PageDown and Home/End
36- # - Add search functionality
37- # - Optimize performance: Hide/unrealize items that are not currently on
38- # screen
39
40 # Orientation constants
41 HORIZONTAL = 0
42@@ -468,8 +461,6 @@
43 @param direction: GridMenu class variables (UP, DOWN, LEFT, RIGHT)
44 @return: True if move can be executed, otherwise False
45 """
46- #TODO: This method is not needed if scrolling menu is implemented
47-
48 # If last row is "full" we can't go wrong
49 if len(self.items) % self.row_count == 0:
50 return True
51
52=== modified file 'entertainerlib/frontend/gui/widgets/menu_overlay.py'
53--- entertainerlib/frontend/gui/widgets/menu_overlay.py 2008-11-17 11:20:47 +0000
54+++ entertainerlib/frontend/gui/widgets/menu_overlay.py 2009-05-10 02:38:20 +0000
55@@ -17,11 +17,6 @@
56 provides methods fade_in() and fade_out().
57 """
58
59- #TODO: If user switches quickly from OSD to menu and back, then animation
60- # flickers because the first animation doesn't have time to finish.
61- # This should be fixed! Detect if timeline is still running, stop it
62- # etc.
63-
64 def __init__(self, theme):
65 """Initialize overlay texture."""
66 Texture.__init__(self, filename = theme.getImage("menu_overlay"))
67
68=== modified file 'entertainerlib/frontend/medialibrary/feeds.py'
69--- entertainerlib/frontend/medialibrary/feeds.py 2009-01-26 18:28:26 +0000
70+++ entertainerlib/frontend/medialibrary/feeds.py 2009-05-10 02:27:14 +0000
71@@ -28,35 +28,6 @@
72 if self.number_of_feeds() == 0:
73 self.empty = True
74
75- def add_feed(self, url):
76- """
77- Add feed to the library.
78- @param url: URL of the feed
79- """
80- self.set_empty(False)
81- print "not functional yet"
82- # TODO: Edit conf file and emit message to the backend
83-
84- def remove_feed(self, url):
85- """
86- Remove feed from the library.
87- @param url: URL of the feed
88- """
89- #TODO Edit conf file and emit message to the backend
90- connection = sqlite.connect(self.config.FEED_DB)
91- cursor = connection.cursor()
92- cursor.execute("""DELETE FROM feed
93- WHERE url=:url""",
94- {"url" : url})
95- # XXX: rockstar - Why is there fetching happening on a delete
96- # statement?
97- #result = cursor.fetchall()
98- cursor.fetchall()
99- connection.commit()
100- connection.close()
101- if self.number_of_feeds() == 0:
102- self.set_empty(True)
103-
104 def set_empty(self, empty):
105 '''Mark a feed as empty'''
106 self.empty = empty
107
108=== modified file 'entertainerlib/tests/test_frontendfeedlibrary.py'
109--- entertainerlib/tests/test_frontendfeedlibrary.py 2009-02-04 04:17:37 +0000
110+++ entertainerlib/tests/test_frontendfeedlibrary.py 2009-05-10 02:27:14 +0000
111@@ -87,13 +87,6 @@
112 db_conn.commit()
113 db_conn.close()
114
115- def testRemoveFeed(self):
116- """
117- testRemoveFeed: Tests FeedLibrary.remove_feed()
118- """
119- self.library.remove_feed("url2")
120- self.assertEqual(self.library.number_of_feeds(), 9)
121-
122 def testIsEmptyWhenFull(self):
123 """
124 testIsEmptyWhenFull: Tests FeedLibrary.is_empty() when there are feeds
125@@ -101,15 +94,6 @@
126 """
127 self.assertFalse(self.library.is_empty())
128
129- def testIsEmptyWhenEmpty(self):
130- """
131- testIsEmptyWhenEmpty: Tests FeedLibrary.is_empty() when the feed list
132- is empty
133- """
134- for i in range(10):
135- self.library.remove_feed("url"+str(i))
136- self.assertTrue(self.library.is_empty())
137-
138 def testGetFeeds(self):
139 """
140 testGetFeeds: Tests FeedLibrary.get_feeds() sorted by TITLE
141
142=== modified file 'entertainerlib/utils/albumart_downloader.py'
143--- entertainerlib/utils/albumart_downloader.py 2009-03-22 04:53:10 +0000
144+++ entertainerlib/utils/albumart_downloader.py 2009-05-10 02:52:18 +0000
145@@ -100,7 +100,6 @@
146 # Strip
147 str_input = str_input.strip ()
148
149- # TODO: Convert accented to unaccented
150 str_input = str_input.replace (" - ", " ")
151 str_input = str_input.replace (": ", " ")
152 str_input = str_input.replace (" & ", " and ")
153@@ -149,7 +148,6 @@
154 self.search_artist = st_artist
155 self.search_album_no_vol = st_album_no_vol
156
157- # TODO: Improve to decrease wrong cover downloads, maybe add severity?
158 # Assemble list of search keywords (and thus search queries)
159 if st_album == u'Unknown':
160 self.keywords.append ("%s Best of" % (st_artist))
161
162=== modified file 'entertainerlib/utils/lyrics_downloader.py'
163--- entertainerlib/utils/lyrics_downloader.py 2009-03-22 04:06:48 +0000
164+++ entertainerlib/utils/lyrics_downloader.py 2009-05-10 02:50:33 +0000
165@@ -63,7 +63,7 @@
166
167 # Convert title and artist to use in url, special symbols have to be
168 # replaced by a '%' not '%xx'
169- # TODO: Find out what the special symbols are (', &, ...)
170+ # XXX: laymansterms - Find out what the special symbols are (', &, ...)
171 # not letters, digits, spaces and ()$^*=:;|#@}{][!,.-_\
172 self.artist = urllib.quote(self.artist.encode('utf-8'),
173 "'&()$^*=:;|#@}{][!,\\")
174
175=== modified file 'pylintrc'
176--- pylintrc 2009-02-10 02:34:38 +0000
177+++ pylintrc 2009-05-10 02:27:14 +0000
178@@ -294,8 +294,7 @@
179 [MISCELLANEOUS]
180
181 # List of note tags to take in consideration, separated by a comma.
182-# XXX: rockstar - Eventually, we plan on adding back in the TODO line as well.
183-notes=FIXME
184+notes=FIXME,TODO
185
186
187 # checks for similarities and duplicated code. This computation may be

Subscribers

People subscribed via source and target branches