Page MenuHomeSoftware Heritage

typing: make recent mypy (0.812) pass again

Authored by zack on Feb 26 2021, 5:14 PM.

Diff Detail

rDFUSE FUSE virtual file system
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5161 (id=18458)

Rebasing onto fa32c040e2...

Current branch diff-target is up to date.
Changes applied before test
commit 57d375a3ffee9150f89574d902e3dda8ab94714d
Author: Stefano Zacchiroli <>
Date:   Fri Feb 26 17:14:00 2021 +0100

    typing: make recent mypy (0.812) pass again

See for more details.

zack requested review of this revision.Feb 26 2021, 5:18 PM
ardumont added a subscriber: ardumont.


Thanks for unstucking it (I noticed this morning it's been a month since it got red ¯\_(ツ)_/¯ ;)


Is it expected you removed that type annotation here?

This revision is now accepted and ready to land.Feb 26 2021, 5:42 PM

Yeah, because putting there the actual type (the one that subclasses must implement) doesn't type properly because the function body doesn't contain a yield. It used to work with previous versions of mypy, but no longer does. I guess there might be better solutions, but this looked good enough for now to me.

This revision was automatically updated to reflect the committed changes.