Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Call parent's init before field initialisation, not after #730

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data_diff/databases/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ class MsSQL(ThreadedDatabase):
_mssql: Any

def __init__(self, host, port, user, password, *, database, thread_count, **kw):
super().__init__(thread_count=thread_count)

args = dict(server=host, port=port, database=database, user=user, password=password, **kw)
self._args = {k: v for k, v in args.items() if v is not None}
self._args["driver"] = "{ODBC Driver 18 for SQL Server}"
Expand All @@ -190,7 +192,6 @@ def __init__(self, host, port, user, password, *, database, thread_count, **kw):
raise ValueError("Specify a default database and schema.")

self._mssql = None
super().__init__(thread_count=thread_count)

def create_connection(self):
self._mssql = import_mssql()
Expand Down