Page MenuHomePhabricator

commands: necessary annotations and suppresssions to pass pytype
Needs ReviewPublic

Authored by durin42 on Wed, Nov 13, 10:51 PM.

Details

Reviewers
dlax
Group Reviewers
hg-reviewers
Summary

As with other places, there are some places where our types are just
too complicated for pytype, so we put some suppressions in place.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Wed, Nov 13, 10:51 PM
dlax added a subscriber: dlax.Thu, Nov 14, 4:45 AM
dlax added inline comments.
mercurial/commands.py
1124

This one is sad. I think this can be sorted out by replacing the try:/finally: with a context manager. (Can send a patch, if it sounds good to you.)

durin42 added inline comments.Thu, Nov 14, 4:15 PM
mercurial/commands.py
1124

By all means!

dlax requested changes to this revision.Fri, Nov 15, 6:08 AM

D7430 makes this changes unnecessary I think.

This revision now requires changes to proceed.Fri, Nov 15, 6:08 AM
durin42 marked an inline comment as done.Fri, Nov 15, 12:23 PM

I still want to keep the annotations I added. :)

durin42 updated this revision to Diff 18162.Fri, Nov 15, 12:31 PM
dlax added inline comments.Fri, Nov 15, 12:40 PM
mercurial/commands.py
4746

revs is always a smartset.baseset per af9c73f26371 so there should be no attribute error. Or is it because logcmdutil.getlinerangerevs() has no type annotation (whereas logcmdutil.getrevs() has some)?

durin42 updated this revision to Diff 18171.Fri, Nov 15, 4:55 PM