Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternatives to this project? #2

Closed
ekalosak opened this issue Apr 12, 2022 · 12 comments
Closed

Alternatives to this project? #2

ekalosak opened this issue Apr 12, 2022 · 12 comments
Labels
general General information or feedback.

Comments

@ekalosak
Copy link
Contributor

So, I'll start off by saying that this is super useful.
But doesn't it duplicate:

I wonder if it wouldn't be better to join up? Or, what distinguishes this project?

@john-hen
Copy link
Owner

john-hen commented Apr 14, 2022

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.

@john-hen john-hen changed the title Duplicates other projects? Alternatives to this project? Aug 1, 2022
@john-hen john-hen added the general General information or feedback. label Aug 6, 2022
@john-hen
Copy link
Owner

john-hen commented Aug 19, 2022

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.

@fgimian
Copy link

fgimian commented Nov 3, 2022

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 😄

@hoefling
Copy link

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

@odigity
Copy link

odigity commented Jan 16, 2023

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.

@borice
Copy link

borice commented Jan 26, 2023

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?

@borice
Copy link

borice commented Jan 26, 2023

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

@trim21
Copy link

trim21 commented Feb 10, 2023

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

@dciborow
Copy link

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

@odigity
Copy link

odigity commented Mar 13, 2023

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

@trim21
Copy link

trim21 commented Mar 13, 2023

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

@ekalosak
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general General information or feedback.
Projects
None yet
Development

No branches or pull requests

8 participants