<div dir="ltr">` # noqa` works with linters<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">--Hobson<div><br></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Jun 29, 2018 at 6:25 AM, Brett Cannon <span dir="ltr"><<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 28, 2018, 21:28 Terry Reedy, <<a href="mailto:tjreedy@udel.edu" target="_blank">tjreedy@udel.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/24/2018 5:03 AM, Ammar Askar wrote:<br>
>> Is it possible, given that we are not paying for those reports, to<br>
>> customize the 'exclude_lines' definitions?<br>
> <br>
> Do you want to exclude python code or C code?<br>
<br>
Python code.<br>
<br>
> For Python code, coverage.py also has some comments you can<br>
> put down to exclude lines:<br>
> <a href="http://coverage.readthedocs.io/en/coverage-4.2/excluding.html" rel="noreferrer" target="_blank">http://coverage.readthedocs.<wbr>io/en/coverage-4.2/excluding.<wbr>html</a><br>
<br>
Yes, by default, one can use '# pragma: no cover' and if one uses the <br>
--branch flag, '# pragma: no branch'. For more 'advanced exclusion', <br>
one can use the following, normally in .coveragerc.<br>
[report]<br>
exclude_lines = ...<br>
"This is useful if you have often-used constructs to exclude that can be <br>
matched with a regex. You can exclude them all at once without littering <br>
your code with exclusion pragmas."<br>
<br>
For IDLE's test suite, I use a customized .coveragerc. I strongly <br>
prefer to not abandon that and litter the code with # pragmas.<br>
<br>
In order to make sense of the coverage report and have it be truthful, <br>
one needs to know what options are being used.<br>
Is the --branch flag set?<br>
Is .coveragerc or some other configuration file in use?<br>
If so, what is the content?<br>
Do we have any control over the use and content of exclusion settings?<br></blockquote></div><div><br></div><div>Everything is either covered by the Travis or codecov configuration files which are both checked into the cpython repo. (I'm on vacation or else I would provide links to the files themselves.)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- <br>
Terry Jan Reedy<br>
<br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/brett%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>brett%40python.org</a><br>
</blockquote></div>
</font></span><br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/hobsonlane%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>hobsonlane%40gmail.com</a><br>
<br></blockquote></div><br></div>