File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1- import io
21from setuptools import setup
32
43
54def read_files (files ):
65 data = []
76 for file in files :
8- with io . open (file , encoding = 'utf-8' ) as f :
7+ with open (file , encoding = 'utf-8' ) as f :
98 data .append (f .read ())
109 return "\n " .join (data )
1110
1211
1312long_description = read_files (['README.md' , 'CHANGELOG.md' ])
1413
1514meta = {}
16- with io . open ('./src/dotenv/version.py' , encoding = 'utf-8' ) as f :
15+ with open ('./src/dotenv/version.py' , encoding = 'utf-8' ) as f :
1716 exec (f .read (), meta )
1817
1918setup (
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def __init__(
5151 @contextmanager
5252 def _get_stream (self ) -> Iterator [IO [str ]]:
5353 if self .dotenv_path and os .path .isfile (self .dotenv_path ):
54- with io . open (self .dotenv_path , encoding = self .encoding ) as stream :
54+ with open (self .dotenv_path , encoding = self .encoding ) as stream :
5555 yield stream
5656 elif self .stream is not None :
5757 yield self .stream
@@ -129,10 +129,10 @@ def rewrite(
129129) -> Iterator [Tuple [IO [str ], IO [str ]]]:
130130 try :
131131 if not os .path .isfile (path ):
132- with io . open (path , "w+" , encoding = encoding ) as source :
132+ with open (path , "w+" , encoding = encoding ) as source :
133133 source .write ("" )
134134 with tempfile .NamedTemporaryFile (mode = "w+" , delete = False , encoding = encoding ) as dest :
135- with io . open (path , encoding = encoding ) as source :
135+ with open (path , encoding = encoding ) as source :
136136 yield (source , dest ) # type: ignore
137137 except BaseException :
138138 if os .path .isfile (dest .name ):
You can’t perform that action at this time.
0 commit comments