mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-05 10:05:47 +00:00
type: support new configparser signatures
This commit is contained in:
@ -23,7 +23,7 @@ import sys
|
|||||||
|
|
||||||
from collections.abc import Generator, Mapping, MutableMapping
|
from collections.abc import Generator, Mapping, MutableMapping
|
||||||
from string import Template
|
from string import Template
|
||||||
from typing import ClassVar
|
from typing import Any, ClassVar
|
||||||
|
|
||||||
from ahriman.core.configuration.shell_template import ShellTemplate
|
from ahriman.core.configuration.shell_template import ShellTemplate
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class ShellInterpolator(configparser.Interpolation):
|
|||||||
"prefix": sys.prefix,
|
"prefix": sys.prefix,
|
||||||
}
|
}
|
||||||
|
|
||||||
def before_get(self, parser: MutableMapping[str, Mapping[str, str]], section: str, option: str, value: str,
|
def before_get(self, parser: MutableMapping[str, Mapping[str, str]], section: Any, option: Any, value: str,
|
||||||
defaults: Mapping[str, str]) -> str:
|
defaults: Mapping[str, str]) -> str:
|
||||||
"""
|
"""
|
||||||
interpolate option value
|
interpolate option value
|
||||||
@ -100,8 +100,8 @@ class ShellInterpolator(configparser.Interpolation):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
parser(MutableMapping[str, Mapping[str, str]]): option parser
|
parser(MutableMapping[str, Mapping[str, str]]): option parser
|
||||||
section(str): section name
|
section(Any): section name
|
||||||
option(str): option name
|
option(Any): option name
|
||||||
value(str): source (not-converted) value
|
value(str): source (not-converted) value
|
||||||
defaults(Mapping[str, str]): default values
|
defaults(Mapping[str, str]): default values
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user