Skip to content

Commit 2ee10b3

Browse files
pylint: fix unspecified-encoding cases
Fix all cases of W1514 unspecified-encoding. Part of #270
1 parent 43e8457 commit 2ee10b3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def run(self):
3737

3838
package_dir = self.get_package_dir('tarantool')
3939
version_file = os.path.join(package_dir, 'version.py')
40-
with open(version_file, 'w') as file:
40+
with open(version_file, 'w', encoding='utf-8') as file:
4141
file.write(f"__version__ = '{version}'")
4242

4343
return super().run()
@@ -80,7 +80,7 @@ def get_dependencies(filename):
8080
root = os.path.dirname(os.path.realpath(__file__))
8181
requirements = os.path.join(root, filename)
8282
if os.path.isfile(requirements):
83-
with open(requirements) as file:
83+
with open(requirements, encoding='utf-8') as file:
8484
return file.read().splitlines()
8585
raise RuntimeError("Unable to get dependencies from file " + filename)
8686

tarantool/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ def _ssl_load_cert_chain(self, context):
10081008

10091009

10101010
if self.ssl_password_file is not None:
1011-
with open(self.ssl_password_file) as file:
1011+
with open(self.ssl_password_file, encoding=self.encoding) as file:
10121012
for line in file:
10131013
try:
10141014
context.load_cert_chain(certfile=self.ssl_cert_file,

test/suites/lib/tarantool_server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def log_des(self):
163163
# pylint: disable=consider-using-with
164164

165165
if self._log_des is None:
166-
self._log_des = open(self.logfile_path, 'a')
166+
self._log_des = open(self.logfile_path, 'a', encoding='utf-8')
167167
return self._log_des
168168

169169
@log_des.deleter

0 commit comments

Comments
 (0)