Code Monkey home page Code Monkey logo

Comments (12)

fgimian avatar fgimian commented on June 8, 2024 15

I just wanted to mention that one of the biggest advantages of this project is that it allows you to continue using the regular flake8 command which makes it seamless to integrate with IDEs which support flake8.

Just wanted to say thanks a lot for building this 😄

from flake8-pyproject.

john-hen avatar john-hen commented on June 8, 2024 13

You're absolutely right. And you may want to consider using one of those other projects instead, especially FlakeHell.

I looked at FlakeHell some time ago, maybe six months ago or so. If I remember correctly, it was inactive at the time and had been archived. It has been revived since. I think in January, if I read the commit history correctly. Well, I missed that.

Anyway, I preferred the minimal wrapper that is pyproject-flake8, which I mention in the ReadMe. As opposed to FlakeHell, it has no extra dependencies on top of Flake8 itself. So I used that for a while. But then there was a very simple bug, and a PR that was ignored for months. So I decided to do something about it. I could have forked the project and applied the fix. But there is so little code, a rewrite was quick enough to do, and I liked my way better. Writing the tests is the part that actually took some time (though not a lot of it either).

Now, the author of pyproject-flake8 did eventually turn up again and did the maintenance. But that was only like two weeks ago, and now this project here is indeed quite redundant. 🤷 I don't see what other development there's left to do, except add a test in case someone discovers a bug. So at this point, joining forces seems more effort than just... well, doing nothing, really.

We can leave this issue open so that it's clear there are alternatives.

from flake8-pyproject.

odigity avatar odigity commented on June 8, 2024 8

I asked the author of Flake8 to add a link to this project from issue 234 and he said no. Dude's an a-hole.

Thanks for this project, it worked for me.

from flake8-pyproject.

john-hen avatar john-hen commented on June 8, 2024 6

Another project brought up in a different issue is Flake9. But it seems to be dormant, last commit (as of this writing) more than two years ago. Probably because they would vendor Flake8, not monkey-patch it as an external dependency. Which requires more maintenance if they want to keep up with Flake8 development.

Then I stumbled across Flake518, which also seems to do the same as pyproject-Flake8. Neither of them, as of this writing, have caught up with Flake8 version 5 yet, but that may just be a matter of time.

As for this project, and thanks to @vcalvert pitching in, it now (as of version 1.1.0) simply works as a Flake8 plug-in. That is, if you run the usual flake8 command in the terminal from inside the folder than contains pyproject.toml, it will grab the configuration from there, as long as "we" (Flake8-pyproject) have been pip-installed in the same Python environment. The flake8p entry point is still supported, but I, for one, have stopped using it.

Also also, this should mean that you don't need a different pre-commit hook, if you're using one. Personally, I don't, so I cannot be sure.

from flake8-pyproject.

hoefling avatar hoefling commented on June 8, 2024 4

This project is super helpful, thank you so much for the idea and the implementation!

from flake8-pyproject.

borice avatar borice commented on June 8, 2024 2

Seems like after deactivating and re-activating the virtual environment things started working. Sorry for the false alarm.

from flake8-pyproject.

ekalosak avatar ekalosak commented on June 8, 2024 2

Seems ok to close, the consensus has appeared to emerge: this project is a simpler, smoother, more actively maintained competitor to other Flake8-to-pyproject.toml implementations.

from flake8-pyproject.

odigity avatar odigity commented on June 8, 2024 1

If the praise keeps rolling in, this thread will never be closeable. :)

from flake8-pyproject.

trim21 avatar trim21 commented on June 8, 2024 1

I asked the author of Flake8 to add a link to this project from issue 234 and he said no. Dude's an a-hole.

if i remember correctly the authoer of flake8 once said he will consider adding pyproject.toml support after toml lang spec hit 1.0 and python add toml to stdlib...

from flake8-pyproject.

borice avatar borice commented on June 8, 2024

Also wanted to say Thank You for this. I'm still trying to get it to work, but it's probably user error on my part.

What I did was poetry add flake8 flake8-pyproject and then added a [tool.flake8] section in pyproject.toml with the config I wanted, then just ran flake8 <folder_with_src> and it still reported the E501 error even though I have max-line-length = 120 in the TOML config.

flake8 --version returns:

6.0.0 (mccabe: 0.7.0, pycodestyle: 2.10.0, pyflakes: 3.0.0) CPython 3.11.1 on Darwin

I don't have any other configuration file present (such as .flake8, setup.cfg, tox.ini...)
Is there some way to activate the plugin once installed?

from flake8-pyproject.

trim21 avatar trim21 commented on June 8, 2024

flakehell doesn't support flake8 >= 4.0 flakehell/flakehell#22

from flake8-pyproject.

dciborow avatar dciborow commented on June 8, 2024

Have tried pretty much all of the alternatives, and I find this is the easiest one to use.

from flake8-pyproject.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.