mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-17 14:14:20 -05:00
Remove tests/utils.py from mypy's exclude list (#13159)
This commit is contained in:
parent
fa10468eb4
commit
9820665597
1
changelog.d/13159.misc
Normal file
1
changelog.d/13159.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Improve and fix type hints.
|
1
mypy.ini
1
mypy.ini
@ -73,7 +73,6 @@ exclude = (?x)
|
|||||||
|tests/util/test_lrucache.py
|
|tests/util/test_lrucache.py
|
||||||
|tests/util/test_rwlock.py
|
|tests/util/test_rwlock.py
|
||||||
|tests/util/test_wheel_timer.py
|
|tests/util/test_wheel_timer.py
|
||||||
|tests/utils.py
|
|
||||||
)$
|
)$
|
||||||
|
|
||||||
[mypy-synapse.federation.transport.client]
|
[mypy-synapse.federation.transport.client]
|
||||||
|
@ -830,7 +830,6 @@ def setup_test_homeserver(
|
|||||||
|
|
||||||
# Mock TLS
|
# Mock TLS
|
||||||
hs.tls_server_context_factory = Mock()
|
hs.tls_server_context_factory = Mock()
|
||||||
hs.tls_client_options_factory = Mock()
|
|
||||||
|
|
||||||
hs.setup()
|
hs.setup()
|
||||||
if homeserver_to_use == TestHomeServer:
|
if homeserver_to_use == TestHomeServer:
|
||||||
|
@ -64,7 +64,7 @@ def setupdb():
|
|||||||
password=POSTGRES_PASSWORD,
|
password=POSTGRES_PASSWORD,
|
||||||
dbname=POSTGRES_DBNAME_FOR_INITIAL_CREATE,
|
dbname=POSTGRES_DBNAME_FOR_INITIAL_CREATE,
|
||||||
)
|
)
|
||||||
db_conn.autocommit = True
|
db_engine.attempt_to_set_autocommit(db_conn, autocommit=True)
|
||||||
cur = db_conn.cursor()
|
cur = db_conn.cursor()
|
||||||
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
||||||
cur.execute(
|
cur.execute(
|
||||||
@ -94,7 +94,7 @@ def setupdb():
|
|||||||
password=POSTGRES_PASSWORD,
|
password=POSTGRES_PASSWORD,
|
||||||
dbname=POSTGRES_DBNAME_FOR_INITIAL_CREATE,
|
dbname=POSTGRES_DBNAME_FOR_INITIAL_CREATE,
|
||||||
)
|
)
|
||||||
db_conn.autocommit = True
|
db_engine.attempt_to_set_autocommit(db_conn, autocommit=True)
|
||||||
cur = db_conn.cursor()
|
cur = db_conn.cursor()
|
||||||
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
||||||
cur.close()
|
cur.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user