Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | from pathlib import Path |
||
17 | @yorm.attr(files=List.of_type(String)) |
||
18 | @yorm.attr(environments=List.of_type(Environment)) |
||
19 | @yorm.sync("{self.root}/{self.filename}", auto_create=False) |
||
20 | class Config: |
||
21 | |||
22 | def __init__(self, filename="env-diff.yml"): |
||
23 | self.root = Path.cwd() |
||
24 | self.filename = filename |
||
25 | self.files = [] |
||
26 | self.environments = [] |
||
27 | |||
28 | def __str__(self): |
||
29 | return str(self.path) |
||
30 | |||
31 | @property |
||
32 | def path(self): |
||
33 | return Path(self.root, self.filename) |
||
34 |