Skip to content

Commit

Permalink
Bug 977464 follow-up: Fix the indentation to use 4 spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan committed Jan 15, 2016
1 parent 7f0a479 commit 4f66b1c
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions xpcom/typelib/xpt/tools/xpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def __init__(self, pointer=False, reference=False):

def __cmp__(self, other):
return (
# First make sure we have two Types of the same type (no pun intended!)
cmp(type(self), type(other)) or
cmp(self.pointer, other.pointer) or
cmp(self.reference, other.reference)
# First make sure we have two Types of the same type (no pun intended!)
cmp(type(self), type(other)) or
cmp(self.pointer, other.pointer) or
cmp(self.reference, other.reference)
)

@staticmethod
Expand Down Expand Up @@ -245,8 +245,8 @@ def __init__(self, tag, **kwargs):

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -297,10 +297,10 @@ def __init__(self, iface, pointer=True, **kwargs):

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
# When comparing interface types, only look at the name.
cmp(self.iface.name, other.iface.name) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
# When comparing interface types, only look at the name.
cmp(self.iface.name, other.iface.name) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -359,9 +359,9 @@ def __init__(self, param_index, pointer=True, **kwargs):

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
cmp(self.param_index, other.param_index) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
cmp(self.param_index, other.param_index) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -418,11 +418,11 @@ def __init__(self, element_type, size_is_arg_num, length_is_arg_num,

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
cmp(self.element_type, other.element_type) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
cmp(self.element_type, other.element_type) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -477,10 +477,10 @@ def __init__(self, size_is_arg_num, length_is_arg_num,

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -533,10 +533,10 @@ def __init__(self, size_is_arg_num, length_is_arg_num,

def __cmp__(self, other):
return (
Type.__cmp__(self, other) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
Type.__cmp__(self, other) or
cmp(self.size_is_arg_num, other.size_is_arg_num) or
cmp(self.length_is_arg_num, other.length_is_arg_num) or
cmp(self.tag, other.tag)
)

@staticmethod
Expand Down Expand Up @@ -595,13 +595,13 @@ def __init__(self, type, in_=True, out=False, retval=False,

def __cmp__(self, other):
return (
cmp(self.type, other.type) or
cmp(self.in_, other.in_) or
cmp(self.out, other.out) or
cmp(self.retval, other.retval) or
cmp(self.shared, other.shared) or
cmp(self.dipper, other.dipper) or
cmp(self.optional, other.optional)
cmp(self.type, other.type) or
cmp(self.in_, other.in_) or
cmp(self.out, other.out) or
cmp(self.retval, other.retval) or
cmp(self.shared, other.shared) or
cmp(self.dipper, other.dipper) or
cmp(self.optional, other.optional)
)

@staticmethod
Expand Down Expand Up @@ -728,16 +728,16 @@ def __init__(self, name, result,

def __cmp__(self, other):
return (
cmp(self.name, other.name) or
cmp(self.getter, other.getter) or
cmp(self.setter, other.setter) or
cmp(self.notxpcom, other.notxpcom) or
cmp(self.constructor, other.constructor) or
cmp(self.hidden, other.hidden) or
cmp(self.optargc, other.optargc) or
cmp(self.implicit_jscontext, other.implicit_jscontext) or
cmp(sorted(self.params), sorted(other.params)) or
cmp(self.result, other.result)
cmp(self.name, other.name) or
cmp(self.getter, other.getter) or
cmp(self.setter, other.setter) or
cmp(self.notxpcom, other.notxpcom) or
cmp(self.constructor, other.constructor) or
cmp(self.hidden, other.hidden) or
cmp(self.optargc, other.optargc) or
cmp(self.implicit_jscontext, other.implicit_jscontext) or
cmp(sorted(self.params), sorted(other.params)) or
cmp(self.result, other.result)
)

def read_params(self, typelib, map, data_pool, offset, num_args):
Expand Down Expand Up @@ -879,9 +879,9 @@ def __init__(self, name, type, value):

def __cmp__(self, other):
return (
cmp(self.name, other.name) or
cmp(self.type, other.type) or
cmp(self.value, other.value)
cmp(self.name, other.name) or
cmp(self.type, other.type) or
cmp(self.value, other.value)
)

@staticmethod
Expand Down Expand Up @@ -1018,12 +1018,12 @@ def __cmp__(self, other):
if c != 0:
return c
return (
cmp(sorted(self.methods), sorted(other.methods)) or
cmp(sorted(self.constants), sorted(other.constants)) or
cmp(self.scriptable, other.scriptable) or
cmp(self.function, other.function) or
cmp(self.builtinclass, other.builtinclass) or
cmp(self.main_process_scriptable_only, other.main_process_scriptable_only)
cmp(sorted(self.methods), sorted(other.methods)) or
cmp(sorted(self.constants), sorted(other.constants)) or
cmp(self.scriptable, other.scriptable) or
cmp(self.function, other.function) or
cmp(self.builtinclass, other.builtinclass) or
cmp(self.main_process_scriptable_only, other.main_process_scriptable_only)
)

def read_descriptor(self, typelib, map, data_pool):
Expand Down

0 comments on commit 4f66b1c

Please sign in to comment.