Skip to content

Commit

Permalink
sagemathgh-37062: clean singular interface (full pep8) + use standard…
Browse files Browse the repository at this point in the history
… 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: sagemath#37062
Reported by: Frédéric Chapoton
Reviewer(s): David Coudert
  • Loading branch information
Release Manager committed Jan 16, 2024
2 parents 1fba8f1 + 2643ec3 commit 1177e0d
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 102 deletions.
7 changes: 3 additions & 4 deletions src/sage/interfaces/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@

import re
import os
import io
import pexpect
import time
import platform
Expand All @@ -221,7 +220,7 @@
# Passing -A allows us to use a minimal GAP installation without
# producing errors at start-up. The files sage.g and sage.gaprc are
# used to load any additional packages that may be available.
gap_cmd = f'gap -A -l "{GAP_ROOT_PATHS}"'
gap_cmd = f'gap -A -l "{GAP_ROOT_PATHS}"'
if SAGE_GAP_MEMORY is not None:
gap_cmd += " -s " + SAGE_GAP_MEMORY + " -o " + SAGE_GAP_MEMORY
else:
Expand Down Expand Up @@ -1320,8 +1319,8 @@ def help(self, s, pager=True):
sline = int(sline) - 1
if self.is_remote():
self._get_tmpfile()
with io.open(self._local_tmpfile(), "r",
encoding=gap_encoding) as fobj:
with open(self._local_tmpfile(), "r",
encoding=gap_encoding) as fobj:
help = fobj.read()
if pager:
from IPython.core.page import page
Expand Down
Loading

0 comments on commit 1177e0d

Please sign in to comment.