microsoft / vscode-flake8

Linting support for python using the flake8 library.
https://marketplace.visualstudio.com/items?itemName=ms-python.flake8
MIT License
37 stars 30 forks source link

Allow the use of Flake8 plugins #318

Open pauloneves opened 1 month ago

pauloneves commented 1 month ago

Flake8 has a plugin system. There are a lot of useful plugins.

Flake8 extension has no instructions about how to use plugins in my code. It looks like it isn't possible, or I that I have to use the flake8 install from the environment.

karthiknadig commented 1 month ago

@pauloneves You can install plugins into your environment and use import strategy as fromEnvironment. We only ship flake8 out of the box. So, you will need to install the plugins in your environment to get the best experience.

Additionally, you can also try the Ruff extension. It uses ruff which has several flake8 plugins implemented in rust for high performance linting.

@luabud we might need a section in the docs explaining this.

pauloneves commented 1 month ago

Yes, it would work with the fromEnviroment, but I really like the bundled Flake8, It is not easy to make my colleagues use Static Analysis and Code formatting tools. We have an requirements-dev.txt with some tools, but we depend on the developers installing them.

An option to use the Flake8 plugins with the extensions would be nice.

Sure, the documentation can be improved.

On Wed, May 29, 2024 at 1:54 PM Karthik Nadig @.***> wrote:

@pauloneves https://github.com/pauloneves You can install plugins into your environment and use import strategy as fromEnvironment. We only ship flake8 out of the box. So, you will need to install the plugins in your environment to get the best experience.

Additionally, you can also try the Ruff extension. It uses ruff which has several flake8 plugins implemented in rust for high performance linting.

@luabud https://github.com/luabud we might need a section in the docs explaining this.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-flake8/issues/318#issuecomment-2137866534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABV7HAOCVDWCID2MPJWR4DZEYB4HAVCNFSM6AAAAABIPIQ5NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZXHA3DMNJTGQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Paulo Eduardo Neves

pauloneves commented 1 month ago

I answered my own question on StackOverflow

I don't know why it was downvoted, but I believe somebody may find it useful in the future.