https://pantsbuild.org/ logo
r

refined-addition-53644

01/20/2023, 4:53 PM
Can anyone help me understand if this
filter
option is used at all for calculating the coverage at all? I tried the usual ctrl+f to find it and I don’t see where it’s being used. https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/python/goals/coverage_py.py#L129
1
c

curved-television-6568

01/20/2023, 5:16 PM
I renamed it and run
./pants check ::
it surfaced these two:
Copy code
src/python/pants/backend/python/goals/pytest_runner.py:347:12: error: "CoverageSubsystem" has no attribute "filter"  [attr-defined]
            if coverage_subsystem.filter:
               ^
src/python/pants/backend/python/goals/pytest_runner.py:348:53: error: "CoverageSubsystem" has no attribute "filter"  [attr-defined]
                cov_args = [f"--cov={morf}" for morf in coverage_subsystem.filter]
                                                        ^
❤️ 1
pretty happy with that trick (just made it up 😄 )
r

refined-addition-53644

01/20/2023, 5:20 PM
Thank you! That is indeed a nice trick