pydocstyle
pydocstyle copied to clipboard
Add error D303 when an f-string is used as a docstring
Emit a new error code D303 when an f-string is found where a docstring is expected.
Fixes #368.
Tests are green locally under 3.5-3.7 except for the stemming issue that #379 addresses.
Thanks a lot, @lordmauve! I rely on this change in https://github.com/wemake-services/wemake-python-styleguide/issues/579
@Nurdok friendly ping. What are the steps to get this merged?
Some of my users rely on this fix: https://github.com/wemake-services/wemake-python-styleguide/issues/579
Grr, I suck at git, trying to get this rebased and mergable... I don't know where 14a59e6 came from.
Ok, I think that's clean
Tests are now failing because mypy returns an error when it sees fstrings under Python 3.5, even though the file won't be imported under Python 3.5, and it appears impossible to tell mypy to ignore this. Looking for a workaround.
# type: ignore
to the rescue!
That does not work; mypy continues to parse the file and raise the error.
Sorry for the long delays in response - I've been on back-to-back family vacation and business trips. I'll to catch up as soon as I can.
@lordmauve any updates on this?
Closing this as it has been inactive for a while. Please feel free to re-open if this is still relevant.
@Nurdok please take a look when you have time - I make the code more resilient to fstrings in case people ignore it even after the warnings.
@Nurdok will you have a chance to look at this? It LGTM but waiting on your review.