Skip to content
Browse files

Switch to new-style classes everywhere.

Tests still seem to pass.
  • Loading branch information...
1 parent 5ef4e83 commit 435663cd917808197ddb305f73c5bd3160125f69 @erikrose erikrose committed Mar 14, 2013
View
2 dxr/plugins/buglink/htmlifier.py
@@ -25,7 +25,7 @@ def load(tree, conn):
print >> sys.stderr, "buglink plugin needs plugin_buglink_name configuration key"
sys.exit(1)
-class BugLinkHtmlifier:
+class BugLinkHtmlifier(object):
def __init__(self, text):
self.text = text
View
2 dxr/plugins/clang/htmlifier.py
@@ -7,7 +7,7 @@
from dxr.utils import search_url
-class ClangHtmlifier:
+class ClangHtmlifier(object):
""" Pygmentizer add syntax regions for file """
def __init__(self, tree, conn, path, text, file_id):
self.tree = tree
View
2 dxr/plugins/clang/tokenizers.py
@@ -46,7 +46,7 @@ def __str__(self):
__repr__ = __str__
-class BaseTokenizer:
+class BaseTokenizer(object):
# Token Types
UNKNOWN = 'unknown'
NEWLINE = 'newline'
View
2 dxr/plugins/hg/htmlifier.py
@@ -60,7 +60,7 @@ def load(tree_, conn):
#bugzilla = tree.plugin_hg_bugzilla
""" Hg htmltifier adds blame and external links to hg web """
-class HgHtmlifier:
+class HgHtmlifier(object):
def __init__(self, path):
self.path = path
self.blame = hg.annotate(
View
2 dxr/plugins/pygmentize/htmlifier.py
@@ -5,7 +5,7 @@
import os, sys
import fnmatch
-class Pygmentizer:
+class Pygmentizer(object):
""" Pygmentizer add syntax regions for file """
def __init__(self, text, lexer):
self.text = text
View
2 dxr/plugins/urllink/htmlifier.py
@@ -16,7 +16,7 @@ def load(tree, conn):
# Nothing to do here
pass
-class UrlHtmlifier:
+class UrlHtmlifier(object):
def __init__(self, text):
self.text = text
View
6 dxr/query.py
@@ -40,7 +40,7 @@
# token, in which we'll wrap it anyway :)
_single_term = re.compile("^[a-zA-Z]+[a-zA-Z0-9]*$")
-class Query:
+class Query(object):
""" Query object, constructor will parse any search query """
def __init__(self, conn, querystr, should_explain=False):
self.conn = conn
@@ -367,7 +367,7 @@ def like_escape(val):
.replace("*", "%"))
-class genWrap:
+class genWrap(object):
""" Auxiliary class for wrapping a generator and make it nicer """
def __init__(self, gen):
self.gen = gen
@@ -430,7 +430,7 @@ def fix_extents_overlap(extents):
yield extents[0]
-class SearchFilter:
+class SearchFilter(object):
""" Base class for all search filters, plugins subclasses this class and
registers an instance of them calling register_filter
"""
View
4 dxr/schema.py
@@ -1,4 +1,4 @@
-class Schema:
+class Schema(object):
""" A representation of SQL table data.
This class allows for easy ways to handle SQL data given blob information,
@@ -26,7 +26,7 @@ def get_create_sql(self):
def get_insert_sql(self, tblname, args):
return self.tables[tblname].get_insert_sql(args)
-class SchemaTable:
+class SchemaTable(object):
""" A table schema dictionary has column names as keys and information tuples
as values: "col": (type, mayBeNull)
type is the type string (e.g., VARCHAR(256) or INTEGER), although it

0 comments on commit 435663c

Please sign in to comment.
Something went wrong with that request. Please try again.