Skip to content

Commit b099025

Browse files
committed
Merge pull request #117 from tvincentNuoDB/master
Updated Python docstrings
2 parents 503aa75 + fc5ea84 commit b099025

File tree

8 files changed

+116
-108
lines changed

8 files changed

+116
-108
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ NuoDB - Python
1212

1313
.. contents::
1414

15-
This package contains the official pure-Python NuoDB_ client library that
16-
provides both a standard `PEP 249`_ SQL API, a NuoDB administration API.
15+
This package contains the community driven pure-Python NuoDB_ client library that
16+
provides both a standard `PEP 249`_ SQL API, a NuoDB administration API. This is a community driven driver with limited support and testing from NuoDB.
1717

1818
Requirements
1919
------------

pynuodb/crypt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ def transform(self, data):
305305
class NoCipher(object):
306306

307307
def __init__(self):
308+
""" A class to allow polymorphic cipher streams"""
308309
pass
309310

310311
def transform(self, data):
312+
""" Returns the data as passed in so that it will be sent unencrypted to the server"""
311313
return data

pynuodb/cursor.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ class Cursor(object):
4040
def __init__(self, session, prepared_statement_cache_size):
4141
"""
4242
Constructor for the Cursor class.
43-
@type session EncodedSession
43+
:type session EncodedSession
4444
"""
4545
self.session = session
46-
""" @type : EncodedSession """
46+
""" :type : EncodedSession """
4747

4848
self._statement_cache = StatementCache(session, prepared_statement_cache_size)
49-
""" @type : StatementCache """
49+
""" :type : StatementCache """
5050

5151
self._result_set = None
52-
""" @type : result_set.ResultSet """
52+
""" :type : result_set.ResultSet """
5353

5454
self.closed = False
5555
self.arraysize = 1
@@ -205,30 +205,30 @@ def setoutputsize(self, size, column=None):
205205
class StatementCache(object):
206206
def __init__(self, session, prepared_statement_cache_size):
207207
self._session = session
208-
""" @type : EncodedSession """
208+
""" :type : EncodedSession """
209209

210210
self._statement = self._session.create_statement()
211-
""" @type : Statement """
211+
""" :type : Statement """
212212

213213
self._ps_cache = dict()
214-
""" @type : dict[str,PreparedStatement] """
214+
""" :type : dict[str,PreparedStatement] """
215215

216216
self._ps_key_queue = deque()
217-
""" @type : deque[str] """
217+
""" :type : deque[str] """
218218

219219
self._ps_cache_size = prepared_statement_cache_size
220-
""" @type : int """
220+
""" :type : int """
221221

222222
def get_statement(self):
223223
"""
224-
@rtype: Statement
224+
:rtype : Statement
225225
"""
226226
return self._statement
227227

228228
def get_prepared_statement(self, query):
229229
"""
230-
@type query str
231-
@rtype: PreparedStatement
230+
:type query str
231+
:rtype : PreparedStatement
232232
"""
233233

234234
statement = self._ps_cache.get(query)
@@ -251,6 +251,7 @@ def get_prepared_statement(self, query):
251251
return statement
252252

253253
def shutdown(self):
254+
""" Close connection and clear the cursor cache"""
254255
self._session.close_statement(self._statement)
255256

256257
for key in self._ps_cache:
@@ -259,3 +260,4 @@ def shutdown(self):
259260

260261
self._ps_cache.clear()
261262
self._ps_key_queue.clear()
263+

0 commit comments

Comments
 (0)