# HG changeset patch # User Dirk Olmes # Date 1433810729 -7200 # Node ID 7c719c4f5655302b3c48f4fd99ab821c33b34cf4 # Parent 8e73a8ae863f13289fffb9684176a3658ca5e258 Fix all remaining code style bugs diff -r 8e73a8ae863f -r 7c719c4f5655 backend/couchdb/Preferences.py --- a/backend/couchdb/Preferences.py Tue Jun 09 02:30:55 2015 +0200 +++ b/backend/couchdb/Preferences.py Tue Jun 09 02:45:29 2015 +0200 @@ -22,7 +22,7 @@ self.document = self.database[row.id] except StopIteration: empty = {"doctype": "preferences"} - doc_id, doc_rev = self.database.save(empty) #@UnusedVariable + doc_id, doc_rev = self.database.save(empty) self.document = self.database[doc_id] def _documentValue(self, key, defaultValue=None): diff -r 8e73a8ae863f -r 7c719c4f5655 backend/sqlalchemy/Mapping.py --- a/backend/sqlalchemy/Mapping.py Tue Jun 09 02:30:55 2015 +0200 +++ b/backend/sqlalchemy/Mapping.py Tue Jun 09 02:45:29 2015 +0200 @@ -71,7 +71,7 @@ mapper(FeedEntry, feedEntryTable) mapper(Feed, feedTable, properties = { - "entries" : relation(FeedEntry, backref="feed", lazy=True, cascade="delete, delete-orphan") + 'entries': relation(FeedEntry, backref="feed", lazy=True, cascade="delete, delete-orphan") } ) mapper(Preference, preferencesTable) diff -r 8e73a8ae863f -r 7c719c4f5655 feedworm.py --- a/feedworm.py Tue Jun 09 02:30:55 2015 +0200 +++ b/feedworm.py Tue Jun 09 02:45:29 2015 +0200 @@ -30,7 +30,7 @@ if __name__ == '__main__': filterWarnings() configureLogging() - + backend = BackendFactory.createBackend() preferences = backend.preferences() setupProxy(preferences) diff -r 8e73a8ae863f -r 7c719c4f5655 prettyprint.py --- a/prettyprint.py Tue Jun 09 02:30:55 2015 +0200 +++ b/prettyprint.py Tue Jun 09 02:45:29 2015 +0200 @@ -2,7 +2,7 @@ import sys newlineAfter = ['{', '[', ','] -newlineBefore = [ '}', ']' ] +newlineBefore = ['}', ']'] def prettyPrint(file): indent = 0 @@ -25,7 +25,7 @@ printCommand(char) if doIndent: - for x in range(indent): #@UnusedVariable + for x in range(indent): sys.stdout.write(" ") doIndent = False @@ -35,7 +35,7 @@ def p_nl(char): sys.stdout.write(char) sys.stdout.write("\n") - + def nl_p(char): sys.stdout.write("\n") sys.stdout.write(char) @@ -44,7 +44,7 @@ if len(sys.argv) < 2: print("usage: %s " % (sys.argv[0])) sys.exit(1) - + filename = sys.argv[1] with open(filename) as file: prettyPrint(file) diff -r 8e73a8ae863f -r 7c719c4f5655 tests/FeedUpdaterTests.py --- a/tests/FeedUpdaterTests.py Tue Jun 09 02:30:55 2015 +0200 +++ b/tests/FeedUpdaterTests.py Tue Jun 09 02:45:29 2015 +0200 @@ -13,12 +13,12 @@ except FeedUpdateException: # this one was expected pass - + def testFeedContainsValidUrl(self): feed = Feed("valid", "http://www.joelonsoftware.com/rss.xml") result = FeedUpdater(None, feed).getFeed() self.assertEqual("Joel on Software", result["feed"].title) if __name__ == "__main__": - #import sys;sys.argv = ['', 'Test.testName'] + # import sys;sys.argv = ['', 'Test.testName'] unittest.main() diff -r 8e73a8ae863f -r 7c719c4f5655 tests/couchdb/FeedTests.py --- a/tests/couchdb/FeedTests.py Tue Jun 09 02:30:55 2015 +0200 +++ b/tests/couchdb/FeedTests.py Tue Jun 09 02:45:29 2015 +0200 @@ -33,5 +33,5 @@ self.database = self.server.create(DATABASE_NAME) if __name__ == "__main__": - #import sys;sys.argv = ['', 'Test.testName'] + # import sys;sys.argv = ['', 'Test.testName'] unittest.main() diff -r 8e73a8ae863f -r 7c719c4f5655 tests/couchdb/ListDateTimeFieldTests.py --- a/tests/couchdb/ListDateTimeFieldTests.py Tue Jun 09 02:30:55 2015 +0200 +++ b/tests/couchdb/ListDateTimeFieldTests.py Tue Jun 09 02:45:29 2015 +0200 @@ -60,5 +60,5 @@ return database if __name__ == "__main__": - #import sys;sys.argv = ['', 'Test.testName'] + # import sys;sys.argv = ['', 'Test.testName'] unittest.main()