from .const import __version__
from praw import Reddit, const

def message(self, to, title, body, from_sr=None):
  """
  Abstract function for sending out a message via string.

  :param to: Destination of the message.
  :param title: The subject line of the message.
  :param body: The body of the message.
  :param from_sr: A Subreddit instance of string to send the message from. By default the message originates from the user.
  :returns: The json response from the server.

  example:

  .. code-block:: python
           
    reddit = praw.Reddit(client_id='CLIENT_ID',
                         client_secret="CLIENT_SECRET", password='PASSWORD',
                         user_agent='USERAGENT', username='USERNAME')
    reddit.message('username','title','body')


  """
  data = {'subject': title,
          'text': body,
          'to': to}
  if from_sr:
    data['from_sr'] = str(from_sr)
  return self.post(const.API_PATH['compose'], data=data)


"""
Attach the message function to the Reddit object.
Instantiations of the reddit object will now contain the message function.
"""
Reddit.message = message

@@ -1,35 +1,4 @@
-from .const import __version__%0A
 from
@@ -25,16 +25,17 @@
  const%0A%0A
+%0A
 def mess
@@ -76,24 +76,23 @@
 =None):%0A
+  
   %22%22%22
-%0A  
 Abstract
@@ -140,16 +140,18 @@
 tring.%0A%0A
+  
   :param
@@ -181,24 +181,26 @@
  message.%0A  
+ 
+ 
 :param title
@@ -226,32 +226,34 @@
 of the message.%0A
+  
   :param body: T
@@ -278,16 +278,18 @@
 sage.%0A  
+ 
+ 
 :param f
@@ -352,16 +352,24 @@
 ge from.
+%0A       
  By defa
@@ -410,16 +410,18 @@
 e user.%0A
+  
   :retur
@@ -460,16 +460,18 @@
 erver.%0A%0A
+  
   exampl
@@ -474,16 +474,18 @@
 ample:%0A%0A
+  
   .. cod
@@ -501,27 +501,16 @@
  python%0A
-           
 %0A    red
@@ -748,15 +748,18 @@
 ')%0A%0A
-%0A
+  
   %22%22%22%0A
+  
   da
@@ -792,16 +792,18 @@
         
+  
 'text': 
@@ -808,16 +808,18 @@
 : body,%0A
+  
         
@@ -830,16 +830,18 @@
 o': to%7D%0A
+  
   if fro
@@ -846,16 +846,20 @@
 rom_sr:%0A
+    
     data
@@ -885,16 +885,18 @@
 rom_sr)%0A
+  
   return

Clean up some flake8 issues in __init__.py