diff -r 848ad8052585 -r c43844eb47b7 RefactoringRope/HelpDialog.py --- a/RefactoringRope/HelpDialog.py Sun Sep 20 11:10:02 2020 +0200 +++ b/RefactoringRope/HelpDialog.py Wed Oct 14 19:11:31 2020 +0200 @@ -52,9 +52,8 @@ self.helpEdit.setFontFamily("Monospace") try: - f = open(helpfile, "r", encoding="utf-8") - txt = f.read() - f.close() + with open(helpfile, "r", encoding="utf-8") as f: + txt = f.read() self.helpEdit.setPlainText(txt) except IOError as err: self.helpEdit.setPlainText(