typing: correct the signature of error.CommandError
There's a place in `mercurial.dispatch._parse()` that passes None if a parse
error happens before the command can be parsed out, and casting the error to
bytes works fine because the command and message fields are apparently ignored.
Likewise, TortoiseHg similarly passes None for the same reason.
--- a/mercurial/error.py Fri Mar 24 00:11:38 2023 +0100
+++ b/mercurial/error.py Fri Mar 24 02:22:12 2023 -0400
@@ -155,7 +155,7 @@
"""Exception raised on errors in parsing the command line."""
def __init__(self, command, message):
- # type: (bytes, bytes) -> None
+ # type: (Optional[bytes], bytes) -> None
self.command = command
self.message = message
super(CommandError, self).__init__()