From 9951d55c2c685e920a3dfccb842b35bd70f5dceb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 25 Jun 2014 20:49:21 +0400 Subject: [PATCH] Make most classes new-style classes --- Storage/bkmk_stpickle.py | 5 +++-- bkmk_objects.py | 10 +++++----- sort_db.py | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Storage/bkmk_stpickle.py b/Storage/bkmk_stpickle.py index c4ad32b..444cf35 100644 --- a/Storage/bkmk_stpickle.py +++ b/Storage/bkmk_stpickle.py @@ -1,10 +1,11 @@ """Bookmarks storage manager - pickle; certainly the most simple and elegant :) This file is a part of Bookmarks database and Internet robot. + """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['storage_pickle'] @@ -18,7 +19,7 @@ except ImportError: import pickle -class storage_pickle: +class storage_pickle(object): filename = "bookmarks_db.pickle" def store(self, root_folder): diff --git a/bkmk_objects.py b/bkmk_objects.py index 23fb816..a8c75f2 100644 --- a/bkmk_objects.py +++ b/bkmk_objects.py @@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot. """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" __license__ = "GNU GPL" __all__ = ['Folder', 'Bookmark', 'Ruler', 'Walker', 'Writer', 'Robot', @@ -49,7 +49,7 @@ class Folder(list): walker.end_folder(self, level) -class Bookmark: +class Bookmark(object): isFolder = 0 isBookmark = 1 @@ -93,12 +93,12 @@ class Bookmark: self.charset = charset -class Ruler: +class Ruler(object): isFolder = 0 isBookmark = 0 -class Walker: +class Walker(object): """ Interface class. Any instance that will be passed to Folder.walk_depth may be derived from this class. It is not mandatory - unlike Java @@ -135,7 +135,7 @@ class Writer(Walker): return self.prune == folder.name -class Robot: +class Robot(object): def __init__(self, log): self.log = log diff --git a/sort_db.py b/sort_db.py index f3a5ff1..f53cdd4 100755 --- a/sort_db.py +++ b/sort_db.py @@ -9,16 +9,17 @@ -r - reverse the sort order This file is a part of Bookmarks database and Internet robot. + """ __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design" +__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design" __license__ = "GNU GPL" import sys -class SortBy: +class SortBy(object): def __init__(self, sort_by): self.sort_by = sort_by -- 2.39.5