Skip to content

Commit 2a68bb4

Browse files
committed
Add type annotations to benchmark.py
1 parent 510b48b commit 2a68bb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pymysqlreplication/tests/benchmark.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@
1111
import os
1212
from pymysqlreplication import BinLogStreamReader
1313
from pymysqlreplication.row_event import *
14+
from pymysql.connections import Connection
15+
from pymysql.cursors import Cursor
16+
17+
from typing import Any
1418
import cProfile
1519

1620

17-
def execute(con, query):
21+
def execute(con: Connection, query: str) -> Cursor:
1822
c = con.cursor()
1923
c.execute(query)
2024
return c
2125

22-
def consume_events():
26+
def consume_events() -> None:
2327
stream = BinLogStreamReader(connection_settings=database,
2428
server_id=3,
2529
resume_stream=False,

0 commit comments

Comments
 (0)