-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Upgrade code base to Python 3 #741
Conversation
param/ipython.py
Outdated
@@ -168,7 +160,7 @@ def _build_table(self, info, order, max_col_len=40, only_changed=False): | |||
readonly = 'RO' if p.readonly else 'RW' | |||
allow_None = ' AN' if hasattr(p, 'allow_None') and p.allow_None else '' | |||
|
|||
mode = '%s %s%s' % (constant, readonly, allow_None) | |||
mode = '{} {}{}'.format(constant, readonly, allow_None) |
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.
f-strings seem nicer.
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.
Agreed. Should probably one of those tools that automatically update to f-strings over the codebase. Looks to me like pyupgrade
used this style throughout...
Looks mostly like I would expect though I would definitely prefer f-strings everywhere. Currently it is removing all the |
Agreed, |
I get some more string conversion if I use Ruff: |
I've applied the suggested |
Fixes #703
I ran
pyupgrade
on the code base to upgrade it to Python 3.7, and then manually made some other upgrades. Notable changes include:watch
andon_init
keywords to the signature ofdepends
param.as_unicode
param.is_ordered_dict
Edit:
warn
keyword to the signature ofparam_union