PrincetonUniversity / blocklint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support single-line ignore for docstrings

pacrob opened this issue · comments

Given a docstring that contains a blocked word:

def my_func():
"""
Function that does stuff. More detail at:
https://github.com/repo/that/still/uses/master/file.md
Returns: other stuff
"""

Other linting tools, such as mypy or flake8, allow the # ignore: to be placed after the closing """ so as to not mess with the docstring.

Current solutions are to put the # blocklint... on the same line, which won't work because it shows up in docs, or to ignore the whole file, which misses any future additions.

Please add support for single-line ignore to be placed after a multi-line docstring.

I like this idea but don't have time to implement. I'd be open to any PRs.