fresh-cat-90827
06/27/2021, 8:09 AMdocformatter one and tweaking it to use vulture . All works fine — there is a lot to learn, but I think the approach taken when structuring plugin code is fairly intuitive for a newcomer.
I have a specific question about the flake8 linter available out-of-the-box with Pants. The nice thing about flake8 is that there are tons of plugins (https://github.com/DmytroLitvinov/awesome-flake8-extensions#clean-code) which means that after installing any of those into a Python environment that has flake8 installed, those plugins will be picked up by the flake8 and their rules will run as well.
I wonder what would be a smart thing to do to bring flake8 plugins support in Pants into my monorepo? The flake8 requirement is specified at https://github.com/pantsbuild/pants/blob/release_2.5.1rc3/src/python/pants/backend/python/lint/flake8/subsystem.py#L18 so I wonder how could I extend it to use multiple flake8 plugins (each being a PyPI package) when ./pants lint goal is run?happy-kitchen-89482
06/27/2021, 1:39 PMextra_requirements option in the flake8 scopehappy-kitchen-89482
06/27/2021, 1:39 PMhappy-kitchen-89482
06/27/2021, 1:39 PMhappy-kitchen-89482
06/27/2021, 1:39 PMhappy-kitchen-89482
06/27/2021, 1:40 PM[flake8]
extra_requirements.add = [
"flake8-2020>=1.6.0,<1.7.0"
]fresh-cat-90827
06/28/2021, 8:39 AMextra_requirements is in other subsystems as well, so this is going to be very convenient. Thanks for the help!