is there a more succinct way to glob all files tha...
# general
f
is there a more succinct way to glob all files that are not Python modules than getting all files first and then negating
Copy code
resources(
    name="testdata",
    sources=["tests/testdata/**/*", "!tests/testdata/**/*.py"],
)
?
1
c
The negation is applied in the same intrinsic operation that is collecting all files from your
**/*
pattern, so I think this is rather succinct already.
h
Yeah, this is the most succinct it can be
f
gotcha, thanks folks! I was curious if I missed some fancy syntax closer to the regex e.g.
"tests/testdata/**/*.(!py)"
, but thanks for confirming that’s the way to go! Merging my PRs now then 😛
👍 2