Fix TypeError with bytes docstrings#570
Fix TypeError with bytes docstrings#570tushar-deepsource wants to merge 5 commits intoPyCQA:masterfrom
Conversation
|
Seems like I can't approve the pipeline, do you know what's wrong with the rights @samj1912 ? |
sigmavirus24
left a comment
There was a problem hiding this comment.
There should be an error here otherwise we're silently ignoring bytes docstrings and that is just as wrong as crashing
|
@sigmavirus24 are you suggesting there be another lint rule? |
|
I'm suggesting that skipping byte string docstrings is going to be confusing for users. So we either need to try to do the right thing or emit an error code that this is a byte string and those aren't valid docstrings (because they're not if I understand the old discussion properly). |
|
@sigmavirus24 I'm in favour of simply raising a new issue for bytes then. Trying to do the right thing has its own edge case: if we're unable to decode the bytes object, we can't do much. |
Let me know if the fix is adequate or if it should be fixed in some other way.
Resolves #569
Pending:
If you've added an error code or changed an error code behavior,
you should probably add or change a test case file under
tests/test_cases/and addit to the list under
tests/test_definitions.py.If you've added or changed a command line option,
you should probably add or change a test in
tests/test_integration.py.Make sure to include the PR number after you open and get one.