File: passing_override.py

package info (click to toggle)
python-overrides 7.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 244 kB
  • sloc: python: 1,661; sh: 5; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 297 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import Tuple

from overrides import override


class Parent:
    def execute(self, x: int, y: str, z: bool, *args, **kwargs) -> Tuple[str, int]:
        return y, x


class Child(Parent):
    @override
    def execute(self, *args, **kwargs) -> Tuple[str, int]:
        return "moi", 1