In sigstore-python, we mark modules as internal / semiprivate by prefixing them with _. I'd like interrogate to consider members of these modules as implicitly semiprivate, just like how interrogate already ignores public members of semiprivate classes.
Here's a minimal example:
_test.py
```py
# semiprivate class
class _Foo():
# public member
def bar():
pass
# public class
class Foo():
"""Foo class."""
# public member
def bar():
pass
```
When running python -m interrogate --ignore-semiprivate -vv _test.py, we get the following coverage report:
interrogate skips the semiprivate class and its member, lints the undocumented member of the public class, and also lints the missing module-level docstring. l However, in this situation, I would like interrogate to skip the whole module, as it is semiprivate.
Alternatively, if this isn't something you're comfortable with supporting, maybe the documentation can make it more clear that semiprivateness doesn't affect modules?
I'd be happy to submit a patch for either the behavioral change or the documentation :)
Describe the feature you'd like
In
sigstore-python
, we mark modules as internal / semiprivate by prefixing them with_
. I'd likeinterrogate
to consider members of these modules as implicitly semiprivate, just like howinterrogate
already ignores public members of semiprivate classes.Here's a minimal example:
_test.py
```py # semiprivate class class _Foo(): # public member def bar(): pass # public class class Foo(): """Foo class.""" # public member def bar(): pass ```When running
python -m interrogate --ignore-semiprivate -vv _test.py
, we get the following coverage report:interrogate
skips the semiprivate class and its member, lints the undocumented member of the public class, and also lints the missing module-level docstring. l However, in this situation, I would likeinterrogate
to skip the whole module, as it is semiprivate.Alternatively, if this isn't something you're comfortable with supporting, maybe the documentation can make it more clear that semiprivateness doesn't affect modules?
I'd be happy to submit a patch for either the behavioral change or the documentation :)
Your Environment
interrogate
version(s) (interrogate --version
:1.5.0