Use """ for docstrings
This commit is contained in:
@@ -20,9 +20,9 @@ RE_INSERT_VALUES = re.compile(
|
||||
|
||||
|
||||
class Cursor(object):
|
||||
'''
|
||||
"""
|
||||
This is the object you use to interact with the database.
|
||||
'''
|
||||
"""
|
||||
|
||||
#: Max stetement size which :meth:`executemany` generates.
|
||||
#:
|
||||
@@ -33,10 +33,10 @@ class Cursor(object):
|
||||
_defer_warnings = False
|
||||
|
||||
def __init__(self, connection):
|
||||
'''
|
||||
"""
|
||||
Do not create an instance of a Cursor yourself. Call
|
||||
connections.Connection.cursor().
|
||||
'''
|
||||
"""
|
||||
self.connection = connection
|
||||
self.description = None
|
||||
self.rownumber = 0
|
||||
@@ -48,9 +48,9 @@ class Cursor(object):
|
||||
self._warnings_handled = False
|
||||
|
||||
def close(self):
|
||||
'''
|
||||
"""
|
||||
Closing a cursor just exhausts all remaining data.
|
||||
'''
|
||||
"""
|
||||
conn = self.connection
|
||||
if conn is None:
|
||||
return
|
||||
@@ -274,7 +274,7 @@ class Cursor(object):
|
||||
return args
|
||||
|
||||
def fetchone(self):
|
||||
''' Fetch the next row '''
|
||||
"""Fetch the next row"""
|
||||
self._check_executed()
|
||||
if self._rows is None or self.rownumber >= len(self._rows):
|
||||
return None
|
||||
@@ -283,7 +283,7 @@ class Cursor(object):
|
||||
return result
|
||||
|
||||
def fetchmany(self, size=None):
|
||||
''' Fetch several rows '''
|
||||
"""Fetch several rows"""
|
||||
self._check_executed()
|
||||
if self._rows is None:
|
||||
return ()
|
||||
@@ -293,7 +293,7 @@ class Cursor(object):
|
||||
return result
|
||||
|
||||
def fetchall(self):
|
||||
''' Fetch all the rows '''
|
||||
"""Fetch all the rows"""
|
||||
self._check_executed()
|
||||
if self._rows is None:
|
||||
return ()
|
||||
@@ -444,11 +444,11 @@ class SSCursor(Cursor):
|
||||
return self._nextset(unbuffered=True)
|
||||
|
||||
def read_next(self):
|
||||
""" Read next row """
|
||||
"""Read next row"""
|
||||
return self._conv_row(self._result._read_rowdata_packet_unbuffered())
|
||||
|
||||
def fetchone(self):
|
||||
""" Fetch next row """
|
||||
"""Fetch next row"""
|
||||
self._check_executed()
|
||||
row = self.read_next()
|
||||
if row is None:
|
||||
@@ -477,7 +477,7 @@ class SSCursor(Cursor):
|
||||
return self.fetchall_unbuffered()
|
||||
|
||||
def fetchmany(self, size=None):
|
||||
""" Fetch many """
|
||||
"""Fetch many"""
|
||||
self._check_executed()
|
||||
if size is None:
|
||||
size = self.arraysize
|
||||
@@ -517,4 +517,4 @@ class SSCursor(Cursor):
|
||||
|
||||
|
||||
class SSDictCursor(DictCursorMixin, SSCursor):
|
||||
""" An unbuffered cursor, which returns results as a dictionary """
|
||||
"""An unbuffered cursor, which returns results as a dictionary"""
|
||||
|
||||
Reference in New Issue
Block a user