Various fixes for locations

- Simplified some preferences code
- Added type hints to locations
- Made locations not shared between source instances (source of a bug)
- Updated source iter to resolve locations correctly
This commit is contained in:
GeoffreyCoulaud
2023-08-15 23:53:18 +02:00
parent 16d6a026e5
commit dbb6076fdc
11 changed files with 199 additions and 178 deletions

View File

@@ -1,7 +1,7 @@
import logging
from pathlib import Path
from typing import Mapping, Iterable, NamedTuple
from os import PathLike
from pathlib import Path
from typing import Iterable, Mapping, NamedTuple
from src import shared
@@ -70,7 +70,7 @@ class Location:
def resolve(self) -> None:
"""Choose a root path from the candidates for the location.
If none fits, raise a UnresolvableLocationError"""
If none fits, raise an UnresolvableLocationError"""
if self.root is not None:
return