Annotate type and set self.connection to None in MySQLResult.read as other methods
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,3 +7,5 @@ __pycache__
|
|||||||
/.tox
|
/.tox
|
||||||
/build
|
/build
|
||||||
/pymysql/tests/databases.json
|
/pymysql/tests/databases.json
|
||||||
|
|
||||||
|
/.idea
|
||||||
|
|||||||
@@ -1117,6 +1117,9 @@ class Connection(object):
|
|||||||
class MySQLResult(object):
|
class MySQLResult(object):
|
||||||
|
|
||||||
def __init__(self, connection):
|
def __init__(self, connection):
|
||||||
|
"""
|
||||||
|
@type connection: Connection
|
||||||
|
"""
|
||||||
self.connection = connection
|
self.connection = connection
|
||||||
self.affected_rows = None
|
self.affected_rows = None
|
||||||
self.insert_id = None
|
self.insert_id = None
|
||||||
@@ -1144,7 +1147,7 @@ class MySQLResult(object):
|
|||||||
else:
|
else:
|
||||||
self._read_result_packet(first_packet)
|
self._read_result_packet(first_packet)
|
||||||
finally:
|
finally:
|
||||||
self.connection = False
|
self.connection = None
|
||||||
|
|
||||||
def init_unbuffered_query(self):
|
def init_unbuffered_query(self):
|
||||||
self.unbuffered_active = True
|
self.unbuffered_active = True
|
||||||
|
|||||||
Reference in New Issue
Block a user