mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-09 22:42:13 -04:00
Add missing type hints to config classes. (#12402)
This commit is contained in:
parent
214f3b7d21
commit
4586119f0b
51 changed files with 263 additions and 151 deletions
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
from typing import Dict, List
|
||||
from typing import Any, Dict, List
|
||||
from urllib import parse as urlparse
|
||||
|
||||
import yaml
|
||||
|
@ -31,12 +31,12 @@ logger = logging.getLogger(__name__)
|
|||
class AppServiceConfig(Config):
|
||||
section = "appservice"
|
||||
|
||||
def read_config(self, config, **kwargs) -> None:
|
||||
def read_config(self, config: JsonDict, **kwargs: Any) -> None:
|
||||
self.app_service_config_files = config.get("app_service_config_files", [])
|
||||
self.notify_appservices = config.get("notify_appservices", True)
|
||||
self.track_appservice_user_ips = config.get("track_appservice_user_ips", False)
|
||||
|
||||
def generate_config_section(cls, **kwargs) -> str:
|
||||
def generate_config_section(cls, **kwargs: Any) -> str:
|
||||
return """\
|
||||
# A list of application service config files to use
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue