asottile/pyupgrade
View on GitHub ↗ ★ 4,122 Python
A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
10 mentions on Hacker News by 10 people: 1 story, 9 comments · first 2019-08-27 · latest 2024-09-18
20082026
-
…, but for type hints. Edit: there is pyupgrade which can do this: https://github.com/asottile/pyupgrade#pep-585-typing-rewrite...
comment by notpushkin · 2024-09-18 · in Launch HN: Marblism (YC W24) – Generate full-stack web apps from a prompt -
That's a decade to make a 30 second change. Add something like https://github.com/asottile/pyupgrade to your pre-commit hooks and you won't even need 25 of those seconds.
comment by acdha · 2023-01-15 · in Reasons Python Sucks (2018) -
…here and even points to an interesting project I’d never heard of for automated “de-deprecation” https://github.com/asottile/pyupgrade
comment by alanwreath · 2022-07-27 · in It’s Time to Say Goodbye to These Obsolete Python Libraries -
Howdy, author here. I'm particularly excited about Pants now supporting Pyupgrade: https://github.com/asottile/pyupgrade . It's a well-written tool to automate using all the amazing new Python features, like f-strings. I'm happy to answer…
comment by pbericcc · 2021-11-17 · in Pants 2.8: Golang support, Autoflake and Pyupgrade, Docker publishing, and more -
…I really think it's easier to understand the "business domain" of Python code than Java/C#. [0]: https://github.com/asottile/pyupgrade [1]: https://github.com/psf/black [2]: https://gitlab.com/pycqa/flake8
comment by babayega2 · 2021-10-15 · in Ask HN: Did somebody have success with the migration of Python 2.7 to Java/C#? -
▲ 2
PyUpgrade – Automatically upgrade to newer Python syntaxstory by nethunters · 2021-02-10 · 0 comments
-
…thx for link! I guess you need the `--py36-plus` CLI option to reproduce the desired behaviour https://github.com/asottile/pyupgrade#f-strings thought that might result in lots of other edits to the source, this in particular seems…
comment by ivan_ah · 2021-02-10 · in Flynt: Convert old Python string formatting to f-strings -
…something more than its tagline, pyupgrade[1] offers the same functionality and much more. [1]: https://github.com/asottile/pyupgrade
comment by uranusjr · 2021-02-10 · in Flynt: Convert old Python string formatting to f-strings -
…Use a separate redis/whatever DB for the deployments. After you're finally on python 3, you can use https://github.com/asottile/pyupgrade to modern your code. [1] For the other 2%, use conditionals in your requirements file:…
comment by tony · 2019-12-22 · in Go + Services = One Goliath Project -
…usually set up hooks that run a few checks from https://github.com/pre-commit/pre-commit-hooks plus https://github.com/asottile/pyupgrade plus https://github.com/psf/black plus maybe the mypy and flake8 hooks. These hooks are also run in a…
comment by mmmrk · 2019-08-27 · in How to set up a perfect Python project