0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-13 14:43:30 +01:00

Remove tests/utils.py from mypy's exclude list (#13159)

This commit is contained in:
Andrew Morgan 2022-07-04 15:15:33 +01:00 committed by GitHub
parent fa10468eb4
commit 9820665597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 4 deletions

1
changelog.d/13159.misc Normal file
View file

@ -0,0 +1 @@
Improve and fix type hints.

View file

@ -73,7 +73,6 @@ exclude = (?x)
|tests/util/test_lrucache.py
|tests/util/test_rwlock.py
|tests/util/test_wheel_timer.py
|tests/utils.py
)$
[mypy-synapse.federation.transport.client]

View file

@ -830,7 +830,6 @@ def setup_test_homeserver(
# Mock TLS
hs.tls_server_context_factory = Mock()
hs.tls_client_options_factory = Mock()
hs.setup()
if homeserver_to_use == TestHomeServer:

View file

@ -64,7 +64,7 @@ def setupdb():
password=POSTGRES_PASSWORD,
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.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
cur.execute(
@ -94,7 +94,7 @@ def setupdb():
password=POSTGRES_PASSWORD,
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.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
cur.close()