Hello everyone, I trying Pants since last Friday a...
# general
c
Hello everyone, I trying Pants since last Friday and everything is looking smooth so far (trying to migrate ~30 microservices to a monorepo structure with pants). One thing I cant solve if the
flake8
plugins, I have define a
.ini
file and define in my
pants.toml
my file
Copy code
[...]

[flake8]
config = "thirdparty/flake8/flake8.ini"
version = "flake8==6.0.0"
lockfile = "thirdparty/flake8/.lock"
My main problem is the exclude instruction of the
.ini
file
Copy code
[flake8]
max-line-length = 120
max-complexity = 15
extend-ignore =
  RST902
exclude =
    migrations,
    docs,
    dist,
    build,
    .eggs,
    docker,
    venv,
    sphinx,
    .pytest_cache,
    .tox
    versioneer.py
the exclude is working since a lots of those folder are parsed correctly and does not appear in the
./pants lint ::
command, but the
migrations,
won't work, I have tried so many patterns to make is works,
*migrations,*migrations*,migrations/
also tried to give the absolute path (just to test) and I still having all my migrations folder of all my projects discovered by flake8 (the exclude list is working if running from within the project with the same config file. I have cleaned the cache between every tests 😞 with no luck, any guess on this ? please
h
Hi there! Does the migrations folder need to be known by Pants? If not, you could avoid adding targets for that folder. Otherwise, you can add
skip_flake8
to the folder(s) like this https://www.pantsbuild.org/docs/python-linters-and-formatters#running-only-certain-formatters-or-linters
c
I really need to change my mentality and stop trying to "adapt" what we have and let pants do his job 🙂
Thanks @hundreds-father-404
❤️ 1
h
I really need to change my mentality and stop trying to "adapt" what we have and let pants do his job
well, it's tricky because we do try really hard to keep a close integration with the tools so that if it worked before, it still works. That does not always happen, of course I'm glad it's working now
c
We have over 30 repos with all differents config depending of who bootstraped the repo, trying to bring this to a single monorepo, so far pants looks good, we are just trying to normalize everything and put standards
❤️ 1
tired of this Chaos haha
💯 2
1