Skip to content

Commit

Permalink
revert changes for psycopg2
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Mar 22, 2022
1 parent cf870f3 commit a428260
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ ignore_missing_imports = True
[mypy-prometheus_client.*]
ignore_missing_imports = True

[mypy-psycopg2.*]
ignore_missing_imports = True

[mypy-pymacaroons.*]
ignore_missing_imports = True

Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def create_index(conn):
# have an event_search_fts_idx; unfortunately postgres 9.4
# doesn't support CREATE INDEX IF EXISTS so we just catch the
# exception and ignore it.
import psycopg2
import psycopg2 # type: ignore

try:
c.execute(
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/engines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_engine(database_config) -> BaseDatabaseEngine:

if name == "psycopg2":
# Note that psycopg2cffi-compat provides the psycopg2 module on pypy.
import psycopg2
import psycopg2 # type: ignore

return PostgresEngine(psycopg2, database_config)

Expand Down

0 comments on commit a428260

Please sign in to comment.