What's our policy on using @override in stubs? Should we use it (and add it in cases where it's not used currently) or should we disallow it?
In my opinion we shouldn't allow it, as we're just copying upstream signatures, so the error that this is designed to prevent does not exist in stubs and its usefulness for documentation purposes it dubious. And it would be a lot of work to add it to existing stubs. But I have no strong opinion about this.
In any case we should catch this is CI, whatever we decide on. Adding a check to flake8-pyi not to include @override would be straight-forward, adding a check that it is present if necessary would probably harder (and probably not possible in flake8-pyi).
What's our policy on using
@overridein stubs? Should we use it (and add it in cases where it's not used currently) or should we disallow it?In my opinion we shouldn't allow it, as we're just copying upstream signatures, so the error that this is designed to prevent does not exist in stubs and its usefulness for documentation purposes it dubious. And it would be a lot of work to add it to existing stubs. But I have no strong opinion about this.
In any case we should catch this is CI, whatever we decide on. Adding a check to flake8-pyi not to include
@overridewould be straight-forward, adding a check that it is present if necessary would probably harder (and probably not possible in flake8-pyi).