You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
laike9m
changed the title
Create a challenge for [PEP 698](https://www.python.org/dev/peps/pep-0698/) @override
Create a challenge for PEP 698 @overrideNov 28, 2023
I find it hard to come up with a challenge for @override. We can have something like the following, but # expect-type-error always needs to resides with @override, and it's impossible to have @override in user code and # expect-type-error in test code.
"""TODO:Annotate the methods of class `Tiger`."""classAnimal:
defeat(self, food):
...
fromtypingimportoverrideclassTiger(Animal):
@overridedefeat(self): # expect-type-error
...
@overridedefeat(self, food):
...
@overridedeffly(self): # expect-type-error
...
PEP 698
The text was updated successfully, but these errors were encountered: