Closed
Description
I'm implementing numpydoc validation in my codebase and I have a case where I want to document a parameter like so,
my_param : SubtringMatcher
Full script example
def my_fun(my_arg):
"""
A function to test numpydoc behavior.
This just tests out numpydoc checks for PR06.
Parameters
----------
my_arg : MyCustomSubstringClass
My description goes here.
See Also
--------
my_other_fun : Another fun I wrote.
Examples
--------
arg = MyCustomSubstringClass("test")
my_fun(arg)
"""
pass
This fails with:
$ python -m numpydoc --validate script.my_fun
script.my_fun:PR06:Parameter "my_arg" type should use "str" instead of "string"
Would the project be open to changing how that validation works so PR06 only fails when an offending type name is used all by itself rather than as a substring in a custom type name?