`  # noqa` works with linters

--Hobson


On Fri, Jun 29, 2018 at 6:25 AM, Brett Cannon <br...@python.org> wrote:

>
>
> On Thu, Jun 28, 2018, 21:28 Terry Reedy, <tjre...@udel.edu> wrote:
>
>> On 6/24/2018 5:03 AM, Ammar Askar wrote:
>> >> Is it possible, given that we are not paying for those reports, to
>> >> customize the 'exclude_lines' definitions?
>> >
>> > Do you want to exclude python code or C code?
>>
>> Python code.
>>
>> > For Python code, coverage.py also has some comments you can
>> > put down to exclude lines:
>> > http://coverage.readthedocs.io/en/coverage-4.2/excluding.html
>>
>> Yes, by default, one can use '# pragma: no cover' and if one uses the
>> --branch flag, '# pragma: no branch'.  For more 'advanced exclusion',
>> one can use the following, normally in .coveragerc.
>> [report]
>> exclude_lines = ...
>> "This is useful if you have often-used constructs to exclude that can be
>> matched with a regex. You can exclude them all at once without littering
>> your code with exclusion pragmas."
>>
>> For IDLE's test suite, I use a customized .coveragerc.  I strongly
>> prefer to not abandon that and litter the code with # pragmas.
>>
>> In order to make sense of the coverage report and have it be truthful,
>> one needs to know what options are being used.
>> Is the --branch flag set?
>> Is .coveragerc or some other configuration file in use?
>> If so, what is the content?
>> Do we have any control over the use and content of exclusion settings?
>>
>
> 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.)
>
>
>
>> --
>> Terry Jan Reedy
>>
>> _______________________________________________
>> Python-Dev mailing list
>> Python-Dev@python.org
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
>> brett%40python.org
>>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> hobsonlane%40gmail.com
>
>
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to