You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Item 7 for #87179. In #87179 (comment), Anthony Sottile suggestted running his program pyupgrade, which automates code updates. It would have done some of the things already done and will do some more. In response to my query, he said on another comment that it has been well tested on multiple packages to only do valid changes. His comment includes a bash command: git ls-files -- Lib/idlelib | grep '\\.py$' | xargs pyupgrade --py36-plus
On Windows, use pyupgrade-directories or try above with git bash on idlelib and idle_test.
It is a good practice to run pyugrade multiple times (until there are no new changes produced, because it might upgrade stuff several times: % -> .format -> f'')
I've sent a demo PR (feel free to close if the diff is too large / not useful).
Activity
pythongh-103668: Run pyugrade on idlelib
sobolevn commentedon Apr 21, 2023
Two notes:
--py36-plus->--py311-pluspyugrademultiple times (until there are no new changes produced, because it might upgrade stuff several times:%->.format->f'')I've sent a demo PR (feel free to close if the diff is too large / not useful).
gh-103668: Run pyugrade on idlelib (#103671)
pythongh-103668: Run pyugrade on idlelib (pythonGH-103671)
[3.11] gh-103668: Run pyugrade on idlelib (GH-103671) (#103730)