<s> from pprint import pformat <EOL> class Model ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , data , api ) : <EOL> self . temp_id = '<STR_LIT>' <EOL> self . data = data <EOL> self . api = api <EOL> def __setitem__ ( self , key , value ) : <EOL> self . data [ key ] = value <EOL> def __getitem__ ( self , key ) : <EOL> return self . data [ key ] <EOL> def __repr__ ( self ) : <EOL> formatted_dict = pformat ( dict ( self . data ) ) <EOL> classname = self . __class__ . __name__ <EOL> return '<STR_LIT>' % ( classname , formatted_dict ) <EOL> class Filter ( Model ) : <EOL> """<STR_LIT>""" <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . api . filters . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . filters . delete ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> class Item ( Model ) : <EOL> """<STR_LIT>""" <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . delete ( [ self [ '<STR_LIT:id>' ] ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> def move ( self , to_project ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . move ( { self [ '<STR_LIT>' ] : [ self [ '<STR_LIT:id>' ] ] } , to_project ) <EOL> self . data [ '<STR_LIT>' ] = to_project <EOL> def close ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . close ( self [ '<STR_LIT:id>' ] ) <EOL> def complete ( self , force_history = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . complete ( [ self [ '<STR_LIT:id>' ] ] , force_history ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> self . data [ '<STR_LIT>' ] = force_history <EOL> def uncomplete ( self , update_item_orders = <NUM_LIT:1> , restore_state = None ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . uncomplete ( [ self [ '<STR_LIT:id>' ] ] , update_item_orders , <EOL> restore_state ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:0> <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:0> <EOL> if restore_state and self [ '<STR_LIT:id>' ] in restore_state : <EOL> self . data [ '<STR_LIT>' ] = restore_state [ self [ '<STR_LIT:id>' ] ] [ <NUM_LIT:0> ] <EOL> self . data [ '<STR_LIT>' ] = restore_state [ self [ '<STR_LIT:id>' ] ] [ <NUM_LIT:1> ] <EOL> self . data [ '<STR_LIT>' ] = restore_state [ self [ '<STR_LIT:id>' ] ] [ <NUM_LIT:2> ] <EOL> self . data [ '<STR_LIT>' ] = restore_state [ self [ '<STR_LIT:id>' ] ] [ <NUM_LIT:3> ] <EOL> def update_date_complete ( self , new_date_utc = None , date_string = None , <EOL> is_forward = None ) : <EOL> """<STR_LIT>""" <EOL> self . api . items . update_date_complete ( self [ '<STR_LIT:id>' ] , new_date_utc , <EOL> date_string , is_forward ) <EOL> if new_date_utc : <EOL> self . data [ '<STR_LIT>' ] = new_date_utc <EOL> if date_string : <EOL> self . data [ '<STR_LIT>' ] = date_string <EOL> class Label ( Model ) : <EOL> """<STR_LIT>""" <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . api . labels . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . labels . delete ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> class LiveNotification ( Model ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class GenericNote ( Model ) : <EOL> """<STR_LIT>""" <EOL> local_manager = None <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . local_manager . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . local_manager . delete ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> class Note ( GenericNote ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , data , api ) : <EOL> GenericNote . __init__ ( self , data , api ) <EOL> self . local_manager = self . api . notes <EOL> class ProjectNote ( GenericNote ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , data , api ) : <EOL> GenericNote . __init__ ( self , data , api ) <EOL> self . local_manager = self . api . project_notes <EOL> class Project ( Model ) : <EOL> """<STR_LIT>""" <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . api . projects . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . projects . delete ( [ self [ '<STR_LIT:id>' ] ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> def archive ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . projects . archive ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> def unarchive ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . projects . unarchive ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:0> <EOL> class Reminder ( Model ) : <EOL> """<STR_LIT>""" <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . api . reminders . update ( self [ '<STR_LIT:id>' ] , ** kwargs ) <EOL> self . data . update ( kwargs ) <EOL> def delete ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . reminders . delete ( self [ '<STR_LIT:id>' ] ) <EOL> self . data [ '<STR_LIT>' ] = <NUM_LIT:1> </s>
