rhythmic-glass-66959
10/03/2022, 8:09 PMflake8-requirements
plugin. Since my requirements.txt
is not in the project's root directory, I need to pass the --requirements-file
option pointing to the requirements in 3rdparty/python
. So I added this to `[flake8].args`:
[flake8]
args = [
...,
"--requirements-file=3rdparty/python/requirements.txt",
]
However, the plugin doesn't seem to be able to read the text file. I suspect an issue with the sandbox. Any ideas?bitter-ability-32190
10/03/2022, 8:14 PMPackage is not listed as a requirement.
-> https://www.pantsbuild.org/docs/reference-python-infer#unowned_dependency_behavior set to error
⢠Package is required but not used.
right now it's a manual step but I'd love to write a plugin for this. Today you can run ./pants dependees <requirement address>
and pipe through wc -l
. You should see 1 dependee (the target generator) for dependencies which aren't usedrhythmic-glass-66959
10/03/2022, 8:22 PMbitter-ability-32190
10/03/2022, 8:26 PMflake8
run will only have a subset of your code, so I imagine you'd get Package is required but not used.
in a fair number of runs šflake8
on many subset of overall repo to make subsequent runs relatively speedyrhythmic-glass-66959
10/03/2022, 8:30 PMflake8-requirements
for now, and wait for your plugin š. Thanks for your quick response.bitter-ability-32190
10/03/2022, 8:30 PMrhythmic-glass-66959
10/03/2022, 8:31 PMUnownedDependencyError: Pants cannot infer owners for the following imports in the target ...
bitter-ability-32190
10/03/2022, 9:06 PMhundreds-father-404
10/03/2022, 9:35 PMhould we have a snippet in the docs regarding this plugin?saying?
bitter-ability-32190
10/03/2022, 9:41 PMhundreds-father-404
10/03/2022, 9:44 PM