home.social

#flake8 — Public Fediverse posts

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

fetched live
  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. 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 💰

  3. 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 🥰

  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. 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

  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. 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

  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!

  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. 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

  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. 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

  15. 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

  16. 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

  17. @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).

  18. @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).

  19. 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).

  20. 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).

  21. @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

  22. @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

  23. @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.

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

  25. 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

  26. 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

  27. 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

  28. 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

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

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

  30. 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

  31. @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/

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

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

    #Flake8 with plugins:
    wps.orsinium.dev/

  33. #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

  34. @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.

  35. @python_discussions That's not true. You need to specify `__all__` in `__init__.py` (and other facades) so that #mypy, #flake8, and #ruff 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.

    #python

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

    #flake8 #MyPy

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

    #flake8 #MyPy

  38. 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`...

  39. 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

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

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

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

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

  42. 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)

  43. 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)

  44. I'm in the process of switching from flake8-import-order to flake8-alphabetize. The former doesn't work with #flake8 v6.0 and newer due to removal of a deprecated API. #python

  45. If your #GitHub #flake8 linting actions suddenly started failing, it's likely due to flake8 moving to GH. It's an easy fix once you know how:
    github.com/anitagraser/movingp

  46. @pamelafox @brettcannon @charliermarsh I want use it for sue. 👍
    I saw that already other developers I trust have moved from #flake8 to #ruff, for example @tiangolo with #fastapi and @samuelcolvin with #pydantic

  47. 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