home.social

#flake8 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #flake8, aggregated by home.social.

  1. I use #ruff as my #Python linter for the speed #flake8 lacked (with a foot still in the other camp for custom rules), was looking at #ty, but hadn’t had any incentive to try #uv.

    Others in the #Python ecosystem might be getting rather more nervous… Looks like the venture capitalists backing #Astral will get their payoff: openai.com/index/openai-to-acq 💰

  2. When installing dependencies, formatting code, linting it, type-checking it, and building docs with or , , , and would previously take from 2min to several more, it now takes less than 15 seconds for the whole thing, thanks to , , and .

    This is for 5 versions (3.10 to 3.15).

    The DX got much better 🥰

  3. When installing dependencies, formatting code, linting it, type-checking it, and building docs with #Poetry or #PDM, #Black, #Flake8, #Mypy and #MkDocs would previously take from 2min to several more, it now takes less than 15 seconds for the whole thing, thanks to #uv, #Ruff, #ty and #Zensical.

    This is for 5 #Python versions (3.10 to 3.15).

    The DX got much better 🥰

  4. When installing dependencies, formatting code, linting it, type-checking it, and building docs with #Poetry or #PDM, #Black, #Flake8, #Mypy and #MkDocs would previously take from 2min to several more, it now takes less than 15 seconds for the whole thing, thanks to #uv, #Ruff, #ty and #Zensical.

    This is for 5 #Python versions (3.10 to 3.15).

    The DX got much better 🥰

  5. When installing dependencies, formatting code, linting it, type-checking it, and building docs with #Poetry or #PDM, #Black, #Flake8, #Mypy and #MkDocs would previously take from 2min to several more, it now takes less than 15 seconds for the whole thing, thanks to #uv, #Ruff, #ty and #Zensical.

    This is for 5 #Python versions (3.10 to 3.15).

    The DX got much better 🥰

  6. Accessing github from work is annoying.

    I hope someone else in the world files a bug soon on flake8 not being compatible with a fresh python 3.12+ virtualenv, now that setuptools 82 is out and flake8 is still using the deprecated (now removed) pkg_resources.

    #flake8 #python #setuptools

  7. Just released! 🚀

    flake8-implicit-str-concat 0.6.0

    A Flake8 plugin to identify those unjoined strings that a first Black run leaves behind:
    "111111111111111111111" "222222222222222222222"

    I hear there's another big release tomorrow? This release adds support for Python 3.14 and for once code changes were needed due to AST deprecation removals.

    Also drop support for almost-very-nearly-EOL Python 3.9.

    github.com/flake8-implicit-str
    #Python #flake8 #release #Python314 #Python39

  8. 🎉 Great news for all heavy users of Spyder’s editor! 🎉

    In 6.1 it’ll give better and much faster error and warning messages!! 🚀⚡

    That’s thanks to @charliermarsh's Ruff package and Flake8. Hope you like it!

  9. 🎉 Great news for all heavy users of Spyder’s editor! 🎉

    In 6.1 it’ll give better and much faster error and warning messages!! 🚀⚡

    That’s thanks to @charliermarsh's Ruff package and Flake8. Hope you like it!

    #Spyder #Python #IDE #ruff #flake8

  10. 🎉 Great news for all heavy users of Spyder’s editor! 🎉

    In 6.1 it’ll give better and much faster error and warning messages!! 🚀⚡

    That’s thanks to @charliermarsh's Ruff package and Flake8. Hope you like it!

    #Spyder #Python #IDE #ruff #flake8

  11. 🎉 Great news for all heavy users of Spyder’s editor! 🎉

    In 6.1 it’ll give better and much faster error and warning messages!! 🚀⚡

    That’s thanks to @charliermarsh's Ruff package and Flake8. Hope you like it!

    #Spyder #Python #IDE #ruff #flake8

  12. flake8 pre-commit integration for Odoo enhances code quality. Follow this comprehensive guide to set up, configure, and troubleshoot your workflow. #Odoo #flake8 #precommit

    teguhteja.id/flake8-pre-commit

  13. Anyone knows of a flake8 plugin (or other tool really) that would catch the following mistake:

    from django.utils.translation import gettext as _
    ...
    result, _ = function_that_returns_a_tuple()
    ...
    print(_("translated message")) # fails

    I'd like to flag usage of the `_` throwaway variable, but only when the file has `import gettext as _` (or `gettext_lazy` i guess).

    #python #django #flake8

  14. Just released: flake8-implicit-str-concat 🚀

    🎱 Add support for #Python 3.12-3.13, drop 3.7-3.8

    🎱 Switch from Flit to Hatchling + hatch-vcs for dynamic versioning

    🎱 Release to PyPI with Trusted Publishing

    pypi.org/project/flake8-implic

    This #Flake8 plugin helps tidy up after Black:

    $ cat 1.py
    s = ('111'
    '222')
    $ black 1.py
    reformatted 1.py
    All done! ✨ 🍰 ✨
    1 file reformatted.
    $ cat 1.py
    s = "111" "222"
    $ flake8 1.py
    1.py:1:10: ISC001 implicitly concatenated string literals on one line

    #release

  15. I've made a Python :python: code linting Action ▶️ for GitHub :github: Code Scanning.

    It wraps up , , , , , and into an Action that uploads to Code Scanning, part of Advanced Security, the GitHub appsec platform.

    ℹ️ that’s free for open source repos hosted on GitHub!

    Read 📖 about it👇 on my blog:
    lnkd.in/es_pd2W6

    Try ⚙️ it👇 on the Actions ▶️ marketplace:
    lnkd.in/ei7-H2V9

  16. @lienrag Je suis en train de tester (et mettre en place) #ALE pour #vim/#neovim. Ça a l’air prometteur. En tout cas le linter/checker fonctionne super bien (que ce soit #uv ou #flake8 ou #mypy).

  17. Turns out after configuration isort can get close enough to what I wanted, and ruff has reimplemented enough of isort that I can just use their linter and fixer.

    Which is good, but then there are the open questions about the long term future of #ruff and what it might do or is doing to the open source Python tooling community it is engulfing ( #flake8, black, etc).

  18. @treyhunner

    It still pisses me off that #flake8 complains if you ever bind a #lambda to a name. "Use a #function instead!" it whines.

    Every time, I want to channel #Kimi #Raikonnen: "Leave me alone, I know what I'm doing!"

    #lint #PITA #opinionated

  19. @benfulton @leahawasser I think most Python tools that measure cyclomatic complexity are based on or use McCabe, from @nedbat (pypi.org/project/mccabe/). has it built-in, has plugins (McCabe is one), probably has it built-in too.

  20. Version 2.1.0 of my flake8-author extension has been released. This version adds support for listing multiple module authors and drops support for Python 3.7.

    github.com/jparise/flake8-auth

    #python #flake8

  21. ✍️ New post introducing my new plugin that checks your usage of ’s logging module.

    adamj.eu/tech/2023/09/07/intro

  22. Spent some time this afternoon migrating one of my projects to use #Ruff instead of #Flake8. Definitely faster overall and maybe worth using in any future project.

    #Python

  23. @warrickball @pyodide I use pyodide to run a whole bunch of things. For example:

    IDE for drawing images with :
    svg.orsinium.dev/

    with plugins:
    wps.orsinium.dev/

  24. #TIL that new release (4.0.0) of Robocop plugin for #RobotFramework got released recently with some neaty rules to further improve Robot Framework code bases.

    I think that this is going to be a good moment to implement Robocop verification as CI job in a repository I work on daily at my job.

    Although such improvement may require a lot of time, examples of #Ruff or #Flake8 show that in the long run it is no-brainer to implement Robocop as well.

    BTW, release notes:
    github.com/MarketSquare/robotf

  25. @python_discussions That's not true. You need to specify `__all__` in `__init__.py` (and other facades) so that , , and know that these packages are imported to be exported. Then flake8 and ruff won't report unused import and mypy will allow reexports from the module.

  26. i guess i'm kinda interested that neither flake8 nor mypy noticed this...

    #flake8 #MyPy

  27. Configuring a max length for comments in that's different than the normal max length would be fantastic. It's ugly to write a comment and on the same line need to use `# noqa: E501`...

  28. The first thing I did upon returning to work was replace #flake8 with #ruff for our entire #python repo. It's cut every one of our test runs by several minutes.
    #win #software #programming

  29. #nixos pkgs.writers.writePython3 really is a gem!

    It even runs #flake8 before deploying which is super helpful.

  30. Hmmm... #emacs #flymake invoked #flake8 doesn't seem to be picking up the home directory .flake8 file. One of those weird things where I never know where an application thinks $HOME is in Windows (even though #emacs ~ takes me right there)

  31. TIL is an extremely fast 🐍 written in 🦀

    ruff can be up to 150x faster than and supports file

    I will definitely try it 👍

    github.com/charliermarsh/ruff

  32. I've made a Python :python: code linting Action ▶️ for GitHub :github: Code Scanning.

    It wraps up #Ruff, #Flake8, #Pylint, #Fixit2, #Mypy, #Pyright and #Pytype into an Action that uploads to Code Scanning, part of Advanced Security, the GitHub appsec platform.

    ℹ️ that’s free for open source repos hosted on GitHub!

    Read 📖 about it👇 on my blog:
    lnkd.in/es_pd2W6

    Try ⚙️ it👇 on the Actions ▶️ marketplace:
    lnkd.in/ei7-H2V9

    #Python #Linting #CodeQuality #Linters #SARIF #GitHubActions

  33. I've made a Python :python: code linting Action ▶️ for GitHub :github: Code Scanning.

    It wraps up #Ruff, #Flake8, #Pylint, #Fixit2, #Mypy, #Pyright and #Pytype into an Action that uploads to Code Scanning, part of Advanced Security, the GitHub appsec platform.

    ℹ️ that’s free for open source repos hosted on GitHub!

    Read 📖 about it👇 on my blog:
    lnkd.in/es_pd2W6

    Try ⚙️ it👇 on the Actions ▶️ marketplace:
    lnkd.in/ei7-H2V9

    #Python #Linting #CodeQuality #Linters #SARIF #GitHubActions

  34. I've made a Python :python: code linting Action ▶️ for GitHub :github: Code Scanning.

    It wraps up #Ruff, #Flake8, #Pylint, #Fixit2, #Mypy, #Pyright and #Pytype into an Action that uploads to Code Scanning, part of Advanced Security, the GitHub appsec platform.

    ℹ️ that’s free for open source repos hosted on GitHub!

    Read 📖 about it👇 on my blog:
    lnkd.in/es_pd2W6

    Try ⚙️ it👇 on the Actions ▶️ marketplace:
    lnkd.in/ei7-H2V9

    #Python #Linting #CodeQuality #Linters #SARIF #GitHubActions

  35. I've made a Python :python: code linting Action ▶️ for GitHub :github: Code Scanning.

    It wraps up #Ruff, #Flake8, #Pylint, #Fixit2, #Mypy, #Pyright and #Pytype into an Action that uploads to Code Scanning, part of Advanced Security, the GitHub appsec platform.

    ℹ️ that’s free for open source repos hosted on GitHub!

    Read 📖 about it👇 on my blog:
    lnkd.in/es_pd2W6

    Try ⚙️ it👇 on the Actions ▶️ marketplace:
    lnkd.in/ei7-H2V9

    #Python #Linting #CodeQuality #Linters #SARIF #GitHubActions

  36. Time for a bit of #cleanup and #documentation for #repod

    gitlab.archlinux.org/archlinux
    gitlab.archlinux.org/archlinux

    I wish #ruff was more compatible with #Python 3.10. Using a lot of match-case statements makes it explode sadly. Was a bit looking forward replacing #flake8, #isort, #pycodestyle and #pydocstyle with it.
    I hope it improves in the future. It looks really promising (and fast!).

    #archlinux #sundaythings

  37. @treyhunner

    It still pisses me off that #flake8 complains if you ever bind a #lambda to a name. "Use a #function instead!" it whines.

    Every time, I want to channel #Kimi #Raikonnen: "Leave me alone, I know what I'm doing!"

    #lint #PITA #opinionated

  38. @treyhunner

    It still pisses me off that #flake8 complains if you ever bind a #lambda to a name. "Use a #function instead!" it whines.

    Every time, I want to channel #Kimi #Raikonnen: "Leave me alone, I know what I'm doing!"

    #lint #PITA #opinionated

  39. @treyhunner

    It still pisses me off that #flake8 complains if you ever bind a #lambda to a name. "Use a #function instead!" it whines.

    Every time, I want to channel #Kimi #Raikonnen: "Leave me alone, I know what I'm doing!"

    #lint #PITA #opinionated

  40. @treyhunner

    It still pisses me off that #flake8 complains if you ever bind a #lambda to a name. "Use a #function instead!" it whines.

    Every time, I want to channel #Kimi #Raikonnen: "Leave me alone, I know what I'm doing!"

    #lint #PITA #opinionated

  41. Time for a bit of #cleanup and #documentation for #repod

    gitlab.archlinux.org/archlinux
    gitlab.archlinux.org/archlinux

    I wish #ruff was more compatible with #Python 3.10. Using a lot of match-case statements makes it explode sadly. Was a bit looking forward replacing #flake8, #isort, #pycodestyle and #pydocstyle with it.
    I hope it improves in the future. It looks really promising (and fast!).

    #archlinux #sundaythings

  42. Time for a bit of #cleanup and #documentation for #repod

    gitlab.archlinux.org/archlinux
    gitlab.archlinux.org/archlinux

    I wish #ruff was more compatible with #Python 3.10. Using a lot of match-case statements makes it explode sadly. Was a bit looking forward replacing #flake8, #isort, #pycodestyle and #pydocstyle with it.
    I hope it improves in the future. It looks really promising (and fast!).

    #archlinux #sundaythings

  43. TIL #ruff is an extremely fast #Python 🐍 #linter written in #Rust 🦀

    ruff can be up to 150x faster than #flake8 and supports #pyproject #toml file

    I will definitely try it 👍

    github.com/charliermarsh/ruff

  44. TIL #ruff is an extremely fast #Python 🐍 #linter written in #Rust 🦀

    ruff can be up to 150x faster than #flake8 and supports #pyproject #toml file

    I will definitely try it 👍

    github.com/charliermarsh/ruff

  45. TIL #ruff is an extremely fast #Python 🐍 #linter written in #Rust 🦀

    ruff can be up to 150x faster than #flake8 and supports #pyproject #toml file

    I will definitely try it 👍

    github.com/charliermarsh/ruff

  46. TIL #ruff is an extremely fast #Python 🐍 #linter written in #Rust 🦀

    ruff can be up to 150x faster than #flake8 and supports #pyproject #toml file

    I will definitely try it 👍

    github.com/charliermarsh/ruff