New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partial flake8 cleanup for repl/ #30964
Comments
New commits:
|
Commit: |
Branch: u/chapoton/30964 |
comment:2
ok, bot is morally green, please review |
comment:3
Below some "since-we-are-editing-these-lines" optional changes. Clearly out of scope for this reformatting ticket, With all or some or none of these in, Optionally fix these comments: -# TODO: This global variable do_preparse should be associated with an
+# TODO: This global variable _do_preparse should be associated with an
# IPython InteractiveShell as opposed to a global variable in this
# module.
_do_preparse = True - If the file is not a Cython, Python, or a Sage file, a ``ValueError``
+ If the file is not a Cython, Python, or Sage file, a ``ValueError`` - # Note: On Python 3 b64encode only accepts bytes, and returns bytes (yet
- # b64decode does accept str, but always returns bytes)
+ # Note: In Python 3, b64encode only accepts bytes, and returns bytes.
b64 = base64.b64encode(str_to_bytes(filename, FS_ENCODING,
"surrogateescape"))
return 'sage.repl.load.load(sage.repl.load.base64.b64decode("{}"),globals(),{})'.format(bytes_to_str(b64, 'ascii'), attach) Optionally split a long line and pep8 its output: - return 'sage.repl.load.load(sage.repl.load.base64.b64decode("{}"),globals(),{})'.format(bytes_to_str(b64, 'ascii'), attach)
+ return ('sage.repl.load.load(sage.repl.load.base64.b64decode'
+ '("{}"), globals(), {})'.format(bytes_to_str(b64, 'ascii'), attach)) Optionally shrink two lines into one - i = s.find('\n')
- s = s[i + 1:]
+ s = s[s.find('\n') + 1:] |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Samuel Lelièvre |
comment:6
Regarding the two flake8 complaints of patchbots. One says
but that seems unrelated to the changes here. One says
but that is as intended: it is imported
|
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:8
after trivial rebase, setting back to positive |
comment:9
Ouch that hurts
Someone left out git stuff from a merge in |
comment:10
Here |
comment:11
Didn't work like I was expecting. Ignore the last comment. So we have one thing at and it looks like another at |
comment:12
There are some merge conflict markers checked in %-) |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:14
ok, sorry. Here is a clean new branch |
comment:15
please review |
comment:16
Looks clean. Back to positive. |
comment:17
merge conflict |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
after trivial rebase, setting back to positive |
Changed branch from u/chapoton/30964 to |
as a general cleaning procedure.
CC: @tscrim @slel
Component: refactoring
Author: Frédéric Chapoton
Branch/Commit:
da3885d
Reviewer: Samuel Lelièvre
Issue created by migration from https://trac.sagemath.org/ticket/30964
The text was updated successfully, but these errors were encountered: