This is an archive of the discontinued Mercurial Phabricator instance.

repository: suppress typing errors on functions without arguments
Needs RevisionPublic

Authored by indygreg on Aug 4 2019, 3:53 PM.

Details

Reviewers
durin42
baymax
Group Reviewers
hg-reviewers
Summary

zope.interface uses class magic to define interfaces. Mypy doesn't
like the methods without arguments and raises a warning for the
dozens of them in repository.py.

This commit adds type annotation comments to silence the error.
TBH I'm not sure if this is the best way to do this. But it does
get the job done. We may have to revisit once we add proper type
annotations to this file. For now, it makes mypy's output far
less verbose.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Aug 4 2019, 3:53 PM
durin42 accepted this revision as: durin42.Aug 14 2019, 3:23 PM
durin42 added a subscriber: durin42.

Seems fine, but probably file a bug against mypy on this.

pulkit added a subscriber: pulkit.Aug 20 2019, 12:19 PM

I tried to queue but test-check-code.t and test-check-commit.t fails.

baymax requested changes to this revision.Jan 24 2020, 12:32 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jan 24 2020, 12:32 PM