This is an archive of the discontinued Mercurial Phabricator instance.

branchmap: correctly set()-ify list argument

Authored by durin42 on Nov 6 2019, 5:59 PM.



Caught with pytype. I'm more than a little curious how this never
caused problems.

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

durin42 created this revision.Nov 6 2019, 5:59 PM
indygreg requested changes to this revision.Nov 8 2019, 11:43 AM
indygreg added a subscriber: indygreg.

Could you please add a comment or add an annotation? I really don't like having to recreate collection instances to satisfy a type checker. Am I wrong in thinking this shouldn't be necessary?

This revision now requires changes to proceed.Nov 8 2019, 11:43 AM
dlax accepted this revision.Nov 14 2019, 3:52 AM
dlax added a comment.Nov 14 2019, 4:39 AM

On second thought, it's not obvious why it'd be better than annotating __init__(). Is this because this would require many changes in callers?

durin42 retitled this revision from branchmap: always copy closednodes to a set to branchmap: correctly set()-ify list argument.Nov 14 2019, 4:05 PM
durin42 edited the summary of this revision. (Show Details)
durin42 updated this revision to Diff 18077.
indygreg accepted this revision.Nov 14 2019, 10:15 PM
This revision is now accepted and ready to land.Nov 14 2019, 10:15 PM
This revision was automatically updated to reflect the committed changes.