Fix some lint errors in pylint 2.10.2 (#2226)

This commit is contained in:
Jesse Hills
2021-08-31 14:00:58 +12:00
committed by GitHub
parent 140ef791aa
commit 54337befc2
6 changed files with 18 additions and 14 deletions
+4 -2
View File
@@ -600,7 +600,7 @@ class EditRequestHandler(BaseHandler):
content = ""
if os.path.isfile(filename):
# pylint: disable=no-value-for-parameter
with open(filename, "r") as f:
with open(file=filename, mode="r", encoding="utf-8") as f:
content = f.read()
self.write(content)
@@ -608,7 +608,9 @@ class EditRequestHandler(BaseHandler):
@bind_config
def post(self, configuration=None):
# pylint: disable=no-value-for-parameter
with open(settings.rel_path(configuration), "wb") as f:
with open(
file=settings.rel_path(configuration), mode="wb", encoding="utf-8"
) as f:
f.write(self.request.body)
self.set_status(200)