I use PyCharm and have a pyproject.toml
, currently configured for flake8
.
Can I make PyCharm use the ignore list for its own inspections too?
My pyproject.toml
:
[tool.flake8]
ignore = [
"I101", # Imported names are in the wrong order
"I201", # Missing newline between import groups
]
I am not looking for a suggestion to configure flake8
as external tool in PyCharm, I am looking to alter/configure the live inspection of PyCharm, as shown e.g. its Problems tab.
Can I make PyCharm use the ignore list for its own inspections too?
The way JetBrains offers to integrate 3rd party tool inspection functionalities into PyCharm is by using their Qodana tool.
This is still separate from the PyCharm linter per se. PyCharm's linter integrates PEP8, with some Flake8 checks and other niceties like spellchecking and refactoring suggestions but it's never been a complete substitute for popular 3rd party code-quality tools (like mypy, Flake8 or python-black) and PyCharm keeps it's own configuration files that are proprietary and not meant to be compatible with pyproject.toml
settings.
At the time of this writing you shouldn't expect complete integration of 3rd party tools with the native PyCharm linter warning system and instead consider the PyCharm linter as its own separate tool geared towards giving you some limited assistance while writing the code.
There have been very few attempts at publishing Flake8 integration plugins for PyCharm, there are for example Flake8 support and flake8-for-pycharm but these plugins seem to have been limited and abandoned in the meanwhile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With