Comments (12)
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.
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.
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.
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.
This project is super helpful, thank you so much for the idea and the implementation!
from flake8-pyproject.
Seems like after deactivating and re-activating the virtual environment things started working. Sorry for the false alarm.
from flake8-pyproject.
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.
If the praise keeps rolling in, this thread will never be closeable. :)
from flake8-pyproject.
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.
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.
flakehell doesn't support flake8 >= 4.0 flakehell/flakehell#22
from flake8-pyproject.
Have tried pretty much all of the alternatives, and I find this is the easiest one to use.
from flake8-pyproject.
Related Issues (14)
- Flake8 `--config` option not supported HOT 11
- Does not support Flake8 6+ HOT 5
- Running via Flake8 pre-commit hook HOT 4
- Remove upper pinning for flake 8 and add test for flake8 main HOT 1
- Support `flake8:local-plugins` HOT 6
- the name case HOT 1
- parse_args() used in hook.py HOT 6
- Flake8-pyproject doesn't work with flake8 `6.1.0` HOT 2
- Unrecognized argument toml config HOT 2
- Override `flake8` script? HOT 6
- Does not support Flake8 5+ HOT 1
- `flake8p` is only aware of `pyproject.toml` in the current folder HOT 1
- Error with `flake8-mock` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flake8-pyproject.