Skip to content

Commit b7b654e

Browse files
author
Release Manager
committed
gh-37062: clean singular interface (full pep8) + use standard open and zip This is - cleaning for pep8 compliance the `singular` pexpect interface - making sure to use everywhere the standard `zip` and `open` ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #37062 Reported by: Frédéric Chapoton Reviewer(s): David Coudert
2 parents 1251ff6 + 2643ec3 commit b7b654e

File tree

6 files changed

+101
-102
lines changed

6 files changed

+101
-102
lines changed

src/sage/interfaces/gap.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@
206206

207207
import re
208208
import os
209-
import io
210209
import pexpect
211210
import time
212211
import platform
@@ -221,7 +220,7 @@
221220
# Passing -A allows us to use a minimal GAP installation without
222221
# producing errors at start-up. The files sage.g and sage.gaprc are
223222
# used to load any additional packages that may be available.
224-
gap_cmd = f'gap -A -l "{GAP_ROOT_PATHS}"'
223+
gap_cmd = f'gap -A -l "{GAP_ROOT_PATHS}"'
225224
if SAGE_GAP_MEMORY is not None:
226225
gap_cmd += " -s " + SAGE_GAP_MEMORY + " -o " + SAGE_GAP_MEMORY
227226
else:
@@ -1320,8 +1319,8 @@ def help(self, s, pager=True):
13201319
sline = int(sline) - 1
13211320
if self.is_remote():
13221321
self._get_tmpfile()
1323-
with io.open(self._local_tmpfile(), "r",
1324-
encoding=gap_encoding) as fobj:
1322+
with open(self._local_tmpfile(), "r",
1323+
encoding=gap_encoding) as fobj:
13251324
help = fobj.read()
13261325
if pager:
13271326
from IPython.core.page import page

0 commit comments

Comments
 (0)