This is an archive of the discontinued Mercurial Phabricator instance.

typing: add type hints to mercurial/

Authored by mharbison72 on Mar 25 2021, 8:10 PM.



The only slightly unusual things here are that location is passed to
ParseError and both bytes and an int (so this accepts both), and the message
passed ProgrammingError is immediately converted to str. Therefore it is
typed as AnyStr, because there are a couple of instances that are already
passed as str.

There are a couple of places where bytes are being passed to builtin exceptions
that might need to be converted to str.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Mar 25 2021, 8:10 PM
pulkit accepted this revision.Apr 11 2021, 5:27 PM
This revision is now accepted and ready to land.Apr 11 2021, 5:27 PM
This revision was automatically updated to reflect the committed changes.