Classmethod property deprecated
This commit is contained in:
+3
-6
@@ -30,6 +30,9 @@ class Config(yaml.YAMLObject):
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
config_directory: ClassVar[Path] = \
|
||||||
|
Path.home() / ".config" / "chinook"
|
||||||
|
|
||||||
yaml_dumper: ClassVar[type[yaml.SafeDumper]] = yaml.SafeDumper
|
yaml_dumper: ClassVar[type[yaml.SafeDumper]] = yaml.SafeDumper
|
||||||
yaml_loader: ClassVar[type[yaml.SafeLoader]] = yaml.SafeLoader
|
yaml_loader: ClassVar[type[yaml.SafeLoader]] = yaml.SafeLoader
|
||||||
yaml_tag: ClassVar[str] = u"!config"
|
yaml_tag: ClassVar[str] = u"!config"
|
||||||
@@ -42,12 +45,6 @@ class Config(yaml.YAMLObject):
|
|||||||
candidates = self.toolings + self._DEFAULT_TOOLS
|
candidates = self.toolings + self._DEFAULT_TOOLS
|
||||||
return next((t for t in candidates if t.native), None)
|
return next((t for t in candidates if t.native), None)
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@property
|
|
||||||
@cache
|
|
||||||
def config_directory(cls) -> Path:
|
|
||||||
return Path.home() / ".config" / "chinook"
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_default_or_load(cls, cfgpath: Path) -> Self:
|
def create_default_or_load(cls, cfgpath: Path) -> Self:
|
||||||
if Path.exists(cfgpath):
|
if Path.exists(cfgpath):
|
||||||
|
|||||||
Reference in New Issue
Block a user