Remove replaced_by_env_path decorator

This commit is contained in:
kramo
2023-06-10 20:54:49 +02:00
parent de3ef53148
commit d340e007e3
7 changed files with 12 additions and 41 deletions

View File

@@ -11,7 +11,6 @@ from src.importer.sources.source import (
URLExecutableSource,
)
from src.utils.decorators import (
replaced_by_env_path,
replaced_by_path,
replaced_by_schema_key,
)
@@ -72,7 +71,6 @@ class BottlesSource(URLExecutableSource):
@property
@replaced_by_schema_key
@replaced_by_path("~/.var/app/com.usebottles.bottles/data/bottles/")
@replaced_by_env_path("XDG_DATA_HOME", "bottles/")
@replaced_by_path("~/.local/share/bottles/")
@replaced_by_path(shared.data_dir / "bottles")
def location(self) -> Path:
raise FileNotFoundError()

View File

@@ -14,7 +14,6 @@ from src.importer.sources.source import (
SourceIterator,
)
from src.utils.decorators import (
replaced_by_env_path,
replaced_by_path,
replaced_by_schema_key,
)
@@ -130,8 +129,7 @@ class HeroicSource(URLExecutableSource):
@property
@replaced_by_schema_key
@replaced_by_path("~/.var/app/com.heroicgameslauncher.hgl/config/heroic/")
@replaced_by_env_path("XDG_CONFIG_HOME", "heroic/")
@replaced_by_path("~/.config/heroic/")
@replaced_by_env_path("appdata", "heroic/")
@replaced_by_path(shared.config_dir / "heroic")
@replaced_by_path(shared.appdata_dir / "heroic")
def location(self) -> Path:
raise FileNotFoundError()

View File

@@ -10,7 +10,6 @@ from src.importer.sources.source import (
URLExecutableSource,
)
from src.utils.decorators import (
replaced_by_env_path,
replaced_by_path,
replaced_by_schema_key,
)
@@ -65,8 +64,7 @@ class ItchSource(URLExecutableSource):
@property
@replaced_by_schema_key
@replaced_by_path("~/.var/app/io.itch.itch/config/itch/")
@replaced_by_env_path("XDG_DATA_HOME", "itch/")
@replaced_by_path("~/.config/itch")
@replaced_by_env_path("appdata", "itch/")
@replaced_by_path(shared.config_dir / "itch")
@replaced_by_path(shared.appdata_dir / "itch")
def location(self) -> Path:
raise FileNotFoundError()

View File

@@ -8,11 +8,7 @@ from typing import Generator
from src import shared # pylint: disable=no-name-in-module
from src.game import Game
from src.importer.sources.source import Source, SourceIterationResult, SourceIterator
from src.utils.decorators import (
replaced_by_env_path,
replaced_by_path,
replaced_by_schema_key,
)
from src.utils.decorators import replaced_by_path, replaced_by_schema_key
class LegendarySourceIterator(SourceIterator):
@@ -79,8 +75,6 @@ class LegendarySource(Source):
@property
@replaced_by_schema_key
@replaced_by_env_path("XDG_CONFIG_HOME", "legendary/")
@replaced_by_path("~/.config/legendary/")
@replaced_by_path("~\\.config\\legendary\\")
@replaced_by_path(shared.config_dir / "legendary")
def location(self) -> Path:
raise FileNotFoundError()

View File

@@ -11,7 +11,6 @@ from src.importer.sources.source import (
URLExecutableSource,
)
from src.utils.decorators import (
replaced_by_env_path,
replaced_by_path,
replaced_by_schema_key,
)
@@ -102,9 +101,8 @@ class SteamSource(URLExecutableSource):
@property
@replaced_by_schema_key
@replaced_by_path("~/.var/app/com.valvesoftware.Steam/data/Steam/")
@replaced_by_env_path("XDG_DATA_HOME", "Steam/")
@replaced_by_path(shared.data_dir / "Steam")
@replaced_by_path("~/.steam/")
@replaced_by_path("~/.local/share/Steam/")
@replaced_by_env_path("programfiles(x86)", "Steam")
@replaced_by_path(shared.programfiles32_dir / "Steam")
def location(self):
raise FileNotFoundError()