Skip to content

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

Description

@tulimid1

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds triageIssue needs triaging

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions