-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Clean python 2 artifacts. Fix #826 #827
Conversation
* `IOError` is `OSError` in python3 * `io.open` -> `open` * `return str()` -> `return ''` directly * direct `super()` call * do not subclass `object`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also made the following changes:
- replace
.format()
withf-strings
- replace
set([1, 2])
with{1, 2}
Co-authored-by: David Brochart <david.brochart@gmail.com>
ipykernel/zmqshell.py
Outdated
@@ -378,7 +378,7 @@ def connect_info(self, arg_s): | |||
print ("Paste the above JSON into a file, and connect with:\n" | |||
" $> jupyter <app> --existing <file>\n" | |||
"or, if you are local, you can connect with just:\n" | |||
" $> jupyter <app> --existing {0}\n" | |||
f" $> jupyter <app> --existing {connection_file}\n" | |||
"or even just:\n" | |||
" $> jupyter <app> --existing\n" | |||
"if this is the most recent Jupyter kernel you have started.".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to remove .format(connection_file)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was removed, like almost all other format calls in next commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
f-strings is faster, than `str().format`
IOError
isOSError
in python3io.open
->open
return str()
->return ''
directlysuper()
callobject