-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.py
41 lines (32 loc) · 918 Bytes
/
data.py
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
33
34
35
36
37
38
39
40
41
from typing import List
from dataclasses import dataclass
@dataclass
class DefaultMirrorDefinition(dict):
fromMavenSettings: str
fromMavenRepositoryId: str
toMavenSettings: str
toRepositoryId: str
classifier: List[str]
packages: List[str]
customHeader: dict[str, str]
types: str
enableRemoteSync: bool
transitive: bool
versionFilterPattern: str
syncDepth: int
@dataclass
class MirrorDefinition(DefaultMirrorDefinition):
fromURL: str
toURL: str
def __getitem__(self, item):
return self.__dict__[item]
class Configuration(dict):
defaults: DefaultMirrorDefinition
mirrors: List[MirrorDefinition]
mavenDependencyPluginVersion: str
mavenDeployPluginVersion: str
def __init__(self, **entries):
super().__init__()
self.__dict__.update(entries)
def __getitem__(self, item):
return self.__dict__[item]