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

Commit ce09a5c

Browse files
author
Sergey Vasilyev
committed
Annotate constructors which always return None
1 parent d5a4d12 commit ce09a5c

24 files changed

+34
-34
lines changed

data_diff/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def diff_schemas(table1, table2, schema1, schema2, columns):
103103

104104

105105
class MyHelpFormatter(click.HelpFormatter):
106-
def __init__(self, **kwargs):
106+
def __init__(self, **kwargs) -> None:
107107
super().__init__(self, **kwargs)
108108
self.indent_increment = 6
109109

data_diff/abcs/database_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Integer(NumericType, IKey):
290290
precision: int = 0
291291
python_type: type = int
292292

293-
def __attrs_post_init__(self):
293+
def __attrs_post_init__(self) -> None:
294294
assert self.precision == 0
295295

296296

data_diff/cloud/datafold_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class DatafoldAPI:
185185
host: str = "https://app.datafold.com"
186186
timeout: int = 30
187187

188-
def __attrs_post_init__(self):
188+
def __attrs_post_init__(self) -> None:
189189
self.host = self.host.rstrip("/")
190190
self.headers = {
191191
"Authorization": f"Key {self.api_key}",

data_diff/databases/_connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Connect:
100100
database_by_scheme: Dict[str, Database]
101101
conn_cache: MutableMapping[Hashable, Database]
102102

103-
def __init__(self, database_by_scheme: Dict[str, Database] = DATABASE_BY_SCHEME):
103+
def __init__(self, database_by_scheme: Dict[str, Database] = DATABASE_BY_SCHEME) -> None:
104104
super().__init__()
105105
self.database_by_scheme = database_by_scheme
106106
self.conn_cache = weakref.WeakValueDictionary()

data_diff/databases/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ class ThreadedDatabase(Database):
12091209
_queue: Optional[ThreadPoolExecutor] = None
12101210
thread_local: threading.local = attrs.field(factory=threading.local)
12111211

1212-
def __attrs_post_init__(self):
1212+
def __attrs_post_init__(self) -> None:
12131213
self._queue = ThreadPoolExecutor(self.thread_count, initializer=self.set_conn)
12141214
logger.info(f"[{self.name}] Starting a threadpool, size={self.thread_count}.")
12151215

data_diff/databases/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class BigQuery(Database):
212212
dataset: str
213213
_client: Any
214214

215-
def __init__(self, project, *, dataset, bigquery_credentials=None, **kw):
215+
def __init__(self, project, *, dataset, bigquery_credentials=None, **kw) -> None:
216216
super().__init__()
217217
credentials = bigquery_credentials
218218
bigquery = import_bigquery()

data_diff/databases/clickhouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class Clickhouse(ThreadedDatabase):
175175

176176
_args: Dict[str, Any]
177177

178-
def __init__(self, *, thread_count: int, **kw):
178+
def __init__(self, *, thread_count: int, **kw) -> None:
179179
super().__init__(thread_count=thread_count)
180180

181181
self._args = kw

data_diff/databases/databricks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Databricks(ThreadedDatabase):
118118
catalog: str
119119
_args: Dict[str, Any]
120120

121-
def __init__(self, *, thread_count, **kw):
121+
def __init__(self, *, thread_count, **kw) -> None:
122122
super().__init__(thread_count=thread_count)
123123
logging.getLogger("databricks.sql").setLevel(logging.WARNING)
124124

data_diff/databases/duckdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class DuckDB(Database):
126126
_args: Dict[str, Any] = attrs.field(init=False)
127127
_conn: Any = attrs.field(init=False)
128128

129-
def __init__(self, **kw):
129+
def __init__(self, **kw) -> None:
130130
super().__init__()
131131
self._args = kw
132132
self._conn = self.create_connection()

data_diff/databases/mssql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class MsSQL(ThreadedDatabase):
168168
_args: Dict[str, Any]
169169
_mssql: Any
170170

171-
def __init__(self, host, port, user, password, *, database, thread_count, **kw):
171+
def __init__(self, host, port, user, password, *, database, thread_count, **kw) -> None:
172172
super().__init__(thread_count=thread_count)
173173

174174
args = dict(server=host, port=port, database=database, user=user, password=password, **kw)

0 commit comments

Comments
 (0)