sync with Debian
This commit is contained in:
10
debian/lib/python/debian_linux/config_v2.py
vendored
10
debian/lib/python/debian_linux/config_v2.py
vendored
@@ -11,7 +11,6 @@ from pathlib import Path
|
||||
from typing import (
|
||||
Optional,
|
||||
Self,
|
||||
TypeVar,
|
||||
)
|
||||
|
||||
import dacite
|
||||
@@ -157,9 +156,6 @@ class ConfigBase:
|
||||
return config
|
||||
|
||||
|
||||
ConfigT = TypeVar('ConfigT', bound=ConfigBase)
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Config(ConfigBase):
|
||||
# Disable basic fields
|
||||
@@ -227,9 +223,9 @@ class Config(ConfigBase):
|
||||
return config
|
||||
|
||||
@classmethod
|
||||
def _read_hierarchy(
|
||||
cls, bases: Iterable[Path], orig: Iterable[ConfigT],
|
||||
) -> Iterable[ConfigT]:
|
||||
def _read_hierarchy[T: ConfigBase](
|
||||
cls, bases: Iterable[Path], orig: Iterable[T],
|
||||
) -> Iterable[T]:
|
||||
for i in orig:
|
||||
try:
|
||||
assert i.path is not None
|
||||
|
Reference in New Issue
Block a user