diff --git a/synapse/config/database.py b/synapse/config/database.py
index 06ccf15cd9..651e31b576 100644
--- a/synapse/config/database.py
+++ b/synapse/config/database.py
@@ -1,5 +1,5 @@
# Copyright 2014-2016 OpenMarket Ltd
-# Copyright 2020-2021 The Matrix.org Foundation C.I.C.
+# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,7 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-import argparse
import logging
import os
@@ -120,7 +119,7 @@ class DatabaseConfig(Config):
self.databases = []
- def read_config(self, config, **kwargs) -> None:
+ def read_config(self, config, **kwargs):
# We *experimentally* support specifying multiple databases via the
# `databases` key. This is a map from a label to database config in the
# same format as the `database` config option, plus an extra
@@ -164,12 +163,12 @@ class DatabaseConfig(Config):
self.databases = [DatabaseConnectionConfig("master", database_config)]
self.set_databasepath(database_path)
- def generate_config_section(self, data_dir_path, **kwargs) -> str:
+ def generate_config_section(self, data_dir_path, **kwargs):
return DEFAULT_CONFIG % {
"database_path": os.path.join(data_dir_path, "homeserver.db")
}
- def read_arguments(self, args: argparse.Namespace) -> None:
+ def read_arguments(self, args):
"""
Cases for the cli input:
- If no databases are configured and no database_path is set, raise.
@@ -195,7 +194,7 @@ class DatabaseConfig(Config):
else:
logger.warning(NON_SQLITE_DATABASE_PATH_WARNING)
- def set_databasepath(self, database_path: str) -> None:
+ def set_databasepath(self, database_path):
if database_path != ":memory:":
database_path = self.abspath(database_path)
@@ -203,7 +202,7 @@ class DatabaseConfig(Config):
self.databases[0].config["args"]["database"] = database_path
@staticmethod
- def add_arguments(parser: argparse.ArgumentParser) -> None:
+ def add_arguments(parser):
db_group = parser.add_argument_group("database")
db_group.add_argument(
"-d",
|