Hacker GitHub

← All repos

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

Mentions per year 10 mentions · busiest year 2021 (5)
20082026
  1. …, but for type hints. Edit: there is pyupgrade which can do this: https://github.com/asottile/pyupgrade#pep-585-typing-rewrite...
  2. 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)
  3. …here and even points to an interesting project I’d never heard of for automated “de-deprecation” https://github.com/asottile/pyupgrade
  4. 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…
  5. …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
  6. ▲ 2
    PyUpgrade – Automatically upgrade to newer Python syntax
    story by nethunters · 2021-02-10 · 0 comments
  7. …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…
  8. …something more than its tagline, pyupgrade[1] offers the same functionality and much more. [1]: https://github.com/asottile/pyupgrade
  9. …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
  10. …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