econchick / econchick/interrogate

False pass when --fail-under=100 and codebase has >4k functions

Open
#186 0 comments 0 reactions 1 assignee Claimed by @econchick View on GitHub
bug needs triage
Dominant language
Python
Stars
676
Forks
55
PR merge metrics
No merged PRs in 30d

Description

### Environment

- `interrogate` version(s) (`interrogate --version`:1.7.0
- Operating System(s): Linux
- Python version(s):3.10

### Description of the bug
interrogate will falsely pass when --fail-under=100 when there are missing docstrings if the number of functions is high enough (n>=4000).

### What you expected to happen
If --fail-under=100, I expect a failure if there are ANY missing docstrings no matter the amount of functions in the codebase.

### How to reproduce (as minimally and precisely as possible)
1. Make a file with 4000 functions (all of which have docstrings) and run interrogate with --fail-under=100, this should pass.
2. Remove 1 docstring, run interrogate with --fail-under=100, this will still pass even though it should not (because there is a missing docstring).

### Anthing else we need to know?
I am fairly confident this is an issue with rounding when using --fail-under. I would suggest either making an exception for 100 (no missing, no rounding) or allow user to set something to fail if ANY function is missing docstring.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.