Remove spurious 'self' arguments that should not be included in interface declarations.

This commit is contained in:
david-sarah 2012-07-24 03:32:56 +00:00
parent fd09b84bb6
commit dcfb27f9bf
2 changed files with 9 additions and 9 deletions

View File

@ -2437,7 +2437,7 @@ class IRepairable(Interface):
class IRepairResults(Interface): class IRepairResults(Interface):
"""I contain the results of a repair operation.""" """I contain the results of a repair operation."""
def get_successful(self): def get_successful():
"""Returns a boolean: True if the repair made the file healthy, False """Returns a boolean: True if the repair made the file healthy, False
if not. Repair failure generally indicates a file that has been if not. Repair failure generally indicates a file that has been
damaged beyond repair.""" damaged beyond repair."""

View File

@ -27,27 +27,27 @@ class IMonitor(Interface):
# the following methods are provided for the operation code # the following methods are provided for the operation code
def is_cancelled(self): def is_cancelled():
"""Returns True if the operation has been cancelled. If True, """Returns True if the operation has been cancelled. If True,
operation code should stop creating new work, and attempt to stop any operation code should stop creating new work, and attempt to stop any
work already in progress.""" work already in progress."""
def raise_if_cancelled(self): def raise_if_cancelled():
"""Raise OperationCancelledError if the operation has been cancelled. """Raise OperationCancelledError if the operation has been cancelled.
Operation code that has a robust error-handling path can simply call Operation code that has a robust error-handling path can simply call
this periodically.""" this periodically."""
def set_status(self, status): def set_status(status):
"""Sets the Monitor's 'status' object to an arbitrary value. """Sets the Monitor's 'status' object to an arbitrary value.
Different operations will store different sorts of status information Different operations will store different sorts of status information
here. Operation code should use get+modify+set sequences to update here. Operation code should use get+modify+set sequences to update
this.""" this."""
def get_status(self): def get_status():
"""Return the status object. If the operation failed, this will be a """Return the status object. If the operation failed, this will be a
Failure instance.""" Failure instance."""
def finish(self, status): def finish(status):
"""Call this when the operation is done, successful or not. The """Call this when the operation is done, successful or not. The
Monitor's lifetime is influenced by the completion of the operation Monitor's lifetime is influenced by the completion of the operation
it is monitoring. The Monitor's 'status' value will be set with the it is monitoring. The Monitor's 'status' value will be set with the
@ -60,16 +60,16 @@ class IMonitor(Interface):
# the following methods are provided for the initiator of the operation # the following methods are provided for the initiator of the operation
def is_finished(self): def is_finished():
"""Return a boolean, True if the operation is done (whether """Return a boolean, True if the operation is done (whether
successful or failed), False if it is still running.""" successful or failed), False if it is still running."""
def when_done(self): def when_done():
"""Return a Deferred that fires when the operation is complete. It """Return a Deferred that fires when the operation is complete. It
will fire with the operation status, the same value as returned by will fire with the operation status, the same value as returned by
get_status().""" get_status()."""
def cancel(self): def cancel():
"""Cancel the operation as soon as possible. is_cancelled() will """Cancel the operation as soon as possible. is_cancelled() will
start returning True after this is called.""" start returning True after this is called."""