This is an archive of the discontinued Mercurial Phabricator instance.

hgext: use io.BytesIO instead of util.stringio
AcceptedPublic

Authored by indygreg on Mar 9 2022, 8:07 PM.

Details

Reviewers
Alphare
Group Reviewers
hg-reviewers
Summary

util.stringio is an alias to io.BytesIO. Let's just use io.BytesIO
directly.

I'm doing this because I noticed that in some cases pytype wasn't able
to infer the proper type of util.stringio. Removing the indirection
will enable type checking to work better.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

indygreg created this revision.Mar 9 2022, 8:07 PM
indygreg updated this revision to Diff 32625.Mar 9 2022, 8:16 PM
Alphare accepted this revision.Mar 14 2022, 6:18 AM
This revision is now accepted and ready to land.Mar 14 2022, 6:18 AM