File: customize_mro.py

package info (click to toggle)
mypy 1.19.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,412 kB
  • sloc: python: 114,754; ansic: 13,343; cpp: 11,380; makefile: 257; sh: 28
file content (17 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from __future__ import annotations

from typing import Callable

from mypy.plugin import ClassDefContext, Plugin


class DummyPlugin(Plugin):
    def get_customize_class_mro_hook(self, fullname: str) -> Callable[[ClassDefContext], None]:
        def analyze(classdef_ctx: ClassDefContext) -> None:
            pass

        return analyze


def plugin(version: str) -> type[DummyPlugin]:
    return DummyPlugin