aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/tests/runner/plugins/dummy-filemapper.py
blob: 1993b5562236d3014e6ef07ded12caf7ebaf49e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import mobase


class DummyFileMapper(mobase.IPluginFileMapper):
    def mappings(self) -> list[mobase.Mapping]:
        return [
            mobase.Mapping(
                source="the source", destination="the destination", is_directory=False
            ),
            mobase.Mapping(
                source="the other source",
                destination="the other destination",
                is_directory=True,
            ),
        ]


class DummyFileMapperAndGame(mobase.IPluginFileMapper, mobase.IPluginGame):
    def __init__(self):
        mobase.IPluginFileMapper.__init__(self)
        mobase.IPluginGame.__init__(self)

    def mappings(self) -> list[mobase.Mapping]:
        return [
            mobase.Mapping(
                source="the source", destination="the destination", is_directory=False
            ),
        ]


def createPlugins() -> list[mobase.IPlugin]:
    return [DummyFileMapper(), DummyFileMapperAndGame()]  # type: ignore