Skip to content
Snippets Groups Projects
Commit 6f125ef7 authored by Matt Harbison's avatar Matt Harbison
Browse files

pyupgrade: drop redundant `open()` modes

I think this is silly, and I'd rather be explicit.  But there's no way to turn
off this transform from the command line, and accepting these changes means less
noise when running this in the future.  See hg 3e84e001b6c1.
parent fc04e133
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@
output = []
if isinstance(self.po, str):
# self.read() expects an iterable of "str" lines
output = open(self.po, 'r', encoding='utf-8')
output = open(self.po, encoding='utf-8')
elif isinstance(self.po, file):
self.po.seek(0)
self.openfile = True
......
......@@ -192,7 +192,7 @@
self.lic_txt.setTextInteractionFlags(
Qt.TextInteractionFlag.TextSelectableByKeyboard|Qt.TextInteractionFlag.TextSelectableByMouse)
try:
with open(paths.get_license_path(), 'r') as fp:
with open(paths.get_license_path()) as fp:
lic = fp.read()
self.lic_txt.setPlainText(lic)
except OSError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment