File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11import pypandoc
2- import io
2+ from io import open
33
44output = pypandoc .convert ('README.md' , 'rst' )
55with open ('README.txt' 'w+' ) as f :
66 f .write (str (output .encode ('utf-8' )))
77
8- readme_rst = io . open ('./README.txt' , 'r' , encoding = 'utf-8' ).read ()
8+ readme_rst = open ('./README.txt' , 'r' , encoding = 'utf-8' ).read ()
99replace = '''
1010 .. figure:: https://uiux.s3.amazonaws.com/2016-logos/email-logo
1111 %402x.png\n :alt: SendGrid Logo\n \n SendGrid Logo\n
1616 \n :target: https://www.sendgrid.com
1717 '''
1818final_text = readme_rst .replace (replace , replacement )
19- with io . open ('./README.txt' , 'w' , encoding = 'utf-8' ) as f :
19+ with open ('./README.txt' , 'w' , encoding = 'utf-8' ) as f :
2020 f .write (final_text )
Original file line number Diff line number Diff line change 22Usage: ./send.py [path to file containing test data]"""
33import argparse
44import sys
5- import io
5+ from io import open
66try :
77 from config import Config
88except ImportError :
@@ -27,7 +27,7 @@ def test_payload(self, payload_filepath):
2727 "Content-Type" : "multipart/form-data; boundary=xYzZY"
2828 }
2929 client = Client (host = self .url , request_headers = headers )
30- f = io . open (payload_filepath , 'r' , encoding = 'utf-8' )
30+ f = open (payload_filepath , 'r' , encoding = 'utf-8' )
3131 data = f .read ()
3232 return client .post (request_body = data )
3333
Original file line number Diff line number Diff line change 11import sys
22import os
3- import io
3+ from io import open
44from setuptools import setup , find_packages
55
66__version__ = None
99
1010long_description = 'Please see our GitHub README'
1111if os .path .exists ('README.txt' ):
12- long_description = io . open ('README.txt' , 'r' , encoding = 'utf-8' ).read ()
12+ long_description = open ('README.txt' , 'r' , encoding = 'utf-8' ).read ()
1313
1414
1515def getRequires ():
You can’t perform that action at this time.
0 commit comments