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

Proposed by Matt Layman
Status: Merged
Approved by: Paul Hummer
Approved revision: 380
Merged at revision: not available
Proposed branch: lp:~mblayman/entertainer/complain-fixme-todo
Merge into: lp:entertainer
Diff against target: None lines
To merge this branch: bzr merge lp:~mblayman/entertainer/complain-fixme-todo
Reviewer Review Type Date Requested Status
Paul Hummer Approve
Review via email: mp+6389@code.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
=== modified file 'entertainerlib/frontend/gui/screens/photo.py'
--- entertainerlib/frontend/gui/screens/photo.py 2009-04-27 03:32:30 +0000
+++ entertainerlib/frontend/gui/screens/photo.py 2009-05-10 02:30:05 +0000
@@ -79,7 +79,6 @@
79 @param texture: Texture to scale79 @param texture: Texture to scale
80 @param zoom_level: Zoom level - Default value is 1 (no zoom)80 @param zoom_level: Zoom level - Default value is 1 (no zoom)
81 """81 """
82 # TODO: Zoom feature is not implemented completely!
83 # Center position when zoomed82 # Center position when zoomed
84 width = texture.get_width()83 width = texture.get_width()
85 height = texture.get_height()84 height = texture.get_height()
8685
=== modified file 'entertainerlib/frontend/gui/tabs/lyrics_tab.py'
--- entertainerlib/frontend/gui/tabs/lyrics_tab.py 2009-04-21 21:04:56 +0000
+++ entertainerlib/frontend/gui/tabs/lyrics_tab.py 2009-05-10 02:41:26 +0000
@@ -49,7 +49,6 @@
49 This function is called when lyrics search is over.49 This function is called when lyrics search is over.
50 @param lyrics: Lyrics or None if lyrics weren't found50 @param lyrics: Lyrics or None if lyrics weren't found
51 """51 """
52 #TODO: We could smoothly fade away throbber
53 self.throbber.hide()52 self.throbber.hide()
5453
55 # Save the results to help determine if the tab can activate54 # Save the results to help determine if the tab can activate
5655
=== modified file 'entertainerlib/frontend/gui/widgets/grid_menu.py'
--- entertainerlib/frontend/gui/widgets/grid_menu.py 2009-02-08 08:44:46 +0000
+++ entertainerlib/frontend/gui/widgets/grid_menu.py 2009-05-10 02:31:34 +0000
@@ -14,13 +14,6 @@
14 scrollable, multirow menus. Real menus should inherit this class14 scrollable, multirow menus. Real menus should inherit this class
15 and override few methods.15 and override few methods.
16 """16 """
17 #TODO:
18 # - Scroll content over (first item comes after the last one)
19 # - Fix animated cursor/content move (do we even want this?)
20 # - Add support for PageUp/PageDown and Home/End
21 # - Add search functionality
22 # - Optimize performance: Hide/unrealize items that are not currently on
23 # screen
2417
25 # Orientation constants18 # Orientation constants
26 HORIZONTAL = 019 HORIZONTAL = 0
@@ -468,8 +461,6 @@
468 @param direction: GridMenu class variables (UP, DOWN, LEFT, RIGHT)461 @param direction: GridMenu class variables (UP, DOWN, LEFT, RIGHT)
469 @return: True if move can be executed, otherwise False462 @return: True if move can be executed, otherwise False
470 """463 """
471 #TODO: This method is not needed if scrolling menu is implemented
472
473 # If last row is "full" we can't go wrong464 # If last row is "full" we can't go wrong
474 if len(self.items) % self.row_count == 0:465 if len(self.items) % self.row_count == 0:
475 return True466 return True
476467
=== modified file 'entertainerlib/frontend/gui/widgets/menu_overlay.py'
--- entertainerlib/frontend/gui/widgets/menu_overlay.py 2008-11-17 11:20:47 +0000
+++ entertainerlib/frontend/gui/widgets/menu_overlay.py 2009-05-10 02:38:20 +0000
@@ -17,11 +17,6 @@
17 provides methods fade_in() and fade_out().17 provides methods fade_in() and fade_out().
18 """18 """
1919
20 #TODO: If user switches quickly from OSD to menu and back, then animation
21 # flickers because the first animation doesn't have time to finish.
22 # This should be fixed! Detect if timeline is still running, stop it
23 # etc.
24
25 def __init__(self, theme):20 def __init__(self, theme):
26 """Initialize overlay texture."""21 """Initialize overlay texture."""
27 Texture.__init__(self, filename = theme.getImage("menu_overlay"))22 Texture.__init__(self, filename = theme.getImage("menu_overlay"))
2823
=== modified file 'entertainerlib/frontend/medialibrary/feeds.py'
--- entertainerlib/frontend/medialibrary/feeds.py 2009-01-26 18:28:26 +0000
+++ entertainerlib/frontend/medialibrary/feeds.py 2009-05-10 02:27:14 +0000
@@ -28,35 +28,6 @@
28 if self.number_of_feeds() == 0:28 if self.number_of_feeds() == 0:
29 self.empty = True29 self.empty = True
3030
31 def add_feed(self, url):
32 """
33 Add feed to the library.
34 @param url: URL of the feed
35 """
36 self.set_empty(False)
37 print "not functional yet"
38 # TODO: Edit conf file and emit message to the backend
39
40 def remove_feed(self, url):
41 """
42 Remove feed from the library.
43 @param url: URL of the feed
44 """
45 #TODO Edit conf file and emit message to the backend
46 connection = sqlite.connect(self.config.FEED_DB)
47 cursor = connection.cursor()
48 cursor.execute("""DELETE FROM feed
49 WHERE url=:url""",
50 {"url" : url})
51 # XXX: rockstar - Why is there fetching happening on a delete
52 # statement?
53 #result = cursor.fetchall()
54 cursor.fetchall()
55 connection.commit()
56 connection.close()
57 if self.number_of_feeds() == 0:
58 self.set_empty(True)
59
60 def set_empty(self, empty):31 def set_empty(self, empty):
61 '''Mark a feed as empty'''32 '''Mark a feed as empty'''
62 self.empty = empty33 self.empty = empty
6334
=== modified file 'entertainerlib/tests/test_frontendfeedlibrary.py'
--- entertainerlib/tests/test_frontendfeedlibrary.py 2009-02-04 04:17:37 +0000
+++ entertainerlib/tests/test_frontendfeedlibrary.py 2009-05-10 02:27:14 +0000
@@ -87,13 +87,6 @@
87 db_conn.commit()87 db_conn.commit()
88 db_conn.close()88 db_conn.close()
8989
90 def testRemoveFeed(self):
91 """
92 testRemoveFeed: Tests FeedLibrary.remove_feed()
93 """
94 self.library.remove_feed("url2")
95 self.assertEqual(self.library.number_of_feeds(), 9)
96
97 def testIsEmptyWhenFull(self):90 def testIsEmptyWhenFull(self):
98 """91 """
99 testIsEmptyWhenFull: Tests FeedLibrary.is_empty() when there are feeds92 testIsEmptyWhenFull: Tests FeedLibrary.is_empty() when there are feeds
@@ -101,15 +94,6 @@
101 """94 """
102 self.assertFalse(self.library.is_empty())95 self.assertFalse(self.library.is_empty())
10396
104 def testIsEmptyWhenEmpty(self):
105 """
106 testIsEmptyWhenEmpty: Tests FeedLibrary.is_empty() when the feed list
107 is empty
108 """
109 for i in range(10):
110 self.library.remove_feed("url"+str(i))
111 self.assertTrue(self.library.is_empty())
112
113 def testGetFeeds(self):97 def testGetFeeds(self):
114 """98 """
115 testGetFeeds: Tests FeedLibrary.get_feeds() sorted by TITLE99 testGetFeeds: Tests FeedLibrary.get_feeds() sorted by TITLE
116100
=== modified file 'entertainerlib/utils/albumart_downloader.py'
--- entertainerlib/utils/albumart_downloader.py 2009-03-22 04:53:10 +0000
+++ entertainerlib/utils/albumart_downloader.py 2009-05-10 02:52:18 +0000
@@ -100,7 +100,6 @@
100 # Strip100 # Strip
101 str_input = str_input.strip ()101 str_input = str_input.strip ()
102102
103 # TODO: Convert accented to unaccented
104 str_input = str_input.replace (" - ", " ")103 str_input = str_input.replace (" - ", " ")
105 str_input = str_input.replace (": ", " ")104 str_input = str_input.replace (": ", " ")
106 str_input = str_input.replace (" & ", " and ")105 str_input = str_input.replace (" & ", " and ")
@@ -149,7 +148,6 @@
149 self.search_artist = st_artist148 self.search_artist = st_artist
150 self.search_album_no_vol = st_album_no_vol149 self.search_album_no_vol = st_album_no_vol
151150
152 # TODO: Improve to decrease wrong cover downloads, maybe add severity?
153 # Assemble list of search keywords (and thus search queries)151 # Assemble list of search keywords (and thus search queries)
154 if st_album == u'Unknown':152 if st_album == u'Unknown':
155 self.keywords.append ("%s Best of" % (st_artist))153 self.keywords.append ("%s Best of" % (st_artist))
156154
=== modified file 'entertainerlib/utils/lyrics_downloader.py'
--- entertainerlib/utils/lyrics_downloader.py 2009-03-22 04:06:48 +0000
+++ entertainerlib/utils/lyrics_downloader.py 2009-05-10 02:50:33 +0000
@@ -63,7 +63,7 @@
6363
64 # Convert title and artist to use in url, special symbols have to be64 # Convert title and artist to use in url, special symbols have to be
65 # replaced by a '%' not '%xx'65 # replaced by a '%' not '%xx'
66 # TODO: Find out what the special symbols are (', &, ...)66 # XXX: laymansterms - Find out what the special symbols are (', &, ...)
67 # not letters, digits, spaces and ()$^*=:;|#@}{][!,.-_\67 # not letters, digits, spaces and ()$^*=:;|#@}{][!,.-_\
68 self.artist = urllib.quote(self.artist.encode('utf-8'),68 self.artist = urllib.quote(self.artist.encode('utf-8'),
69 "'&()$^*=:;|#@}{][!,\\")69 "'&()$^*=:;|#@}{][!,\\")
7070
=== modified file 'pylintrc'
--- pylintrc 2009-02-10 02:34:38 +0000
+++ pylintrc 2009-05-10 02:27:14 +0000
@@ -294,8 +294,7 @@
294[MISCELLANEOUS]294[MISCELLANEOUS]
295295
296# List of note tags to take in consideration, separated by a comma.296# List of note tags to take in consideration, separated by a comma.
297# XXX: rockstar - Eventually, we plan on adding back in the TODO line as well.297notes=FIXME,TODO
298notes=FIXME
299298
300299
301# checks for similarities and duplicated code. This computation may be300# checks for similarities and duplicated code. This computation may be

Subscribers

People subscribed via source and target branches