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
changed the title [-]Create a challenge for [PEP 698](https://www.python.org/dev/peps/pep-0698/) `@override`[/-][+]Create a challenge for PEP 698 `@override`[/+]on Nov 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
...
Activity
[-]Create a challenge for [PEP 698](https://www.python.org/dev/peps/pep-0698/) `@override`[/-][+]Create a challenge for PEP 698 `@override`[/+]laike9m commentedon Dec 10, 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.