Skip to content

Commit

Permalink
Fix spelling typos (#985)
Browse files Browse the repository at this point in the history
Co-authored-by: Gord Thompson <gord@gordthompson.com>
  • Loading branch information
kianmeng and gordthompson authored Dec 15, 2021
1 parent c5da357 commit 7aaca60
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ environment:
APVYR_GENERATE_WHEELS: "false"
APVYR_VERBOSE: "false"
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# http://stackoverflow.com/a/13751649/163740
# http://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros#microsoft-specific-predefined-macros
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\appveyor\\compile.cmd"
Expand Down
2 changes: 1 addition & 1 deletion src/cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct Cursor
int rowcount;

// A dictionary that maps from column name (PyString) to index into the result columns (PyInteger). This is
// constructued during an execute and shared with each row (reference counted) to implement accessing results by
// constructed during an execute and shared with each row (reference counted) to implement accessing results by
// column name.
//
// This duplicates some ODBC functionality, but allows us to use Row objects after the statement is closed and
Expand Down
2 changes: 1 addition & 1 deletion src/getdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inline bool IsWideType(SQLSMALLINT sqltype)
return false;
}

// TODO: Wont pyodbc_free crash if we didn't use pyodbc_realloc.
// TODO: Won't pyodbc_free crash if we didn't use pyodbc_realloc.

static bool ReadVarColumn(Cursor* cur, Py_ssize_t iCol, SQLSMALLINT ctype, bool& isNull, byte*& pbResult, Py_ssize_t& cbResult)
{
Expand Down
4 changes: 2 additions & 2 deletions src/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ static bool GetBufferInfo(Cursor* cur, Py_ssize_t index, PyObject* param, ParamI
else
{
// There are multiple segments, so we'll provide the data at execution time. Pass the PyObject pointer as
// the parameter value which will be pased back to us when the data is needed. (If we release threads, we
// the parameter value which will be passed back to us when the data is needed. (If we release threads, we
// need to up the refcount!)

info.ParameterType = SQL_LONGVARBINARY;
Expand Down Expand Up @@ -1376,7 +1376,7 @@ static bool UpdateParamInfo(Cursor* pCursor, Py_ssize_t nIndex, ParamInfo *pInfo

// If the user didn't provide the full array (in case he gave us an array), the above code would
// set an internal error on the cursor object, as we try to read three values from an array
// which may not have as many. This is ok, because we don't really care if the array is not completly
// which may not have as many. This is ok, because we don't really care if the array is not completely
// specified, so we clear the error in case it comes from this. If the error was already present before that
// we keep it, so the user can handle it.
if (clearError)
Expand Down
2 changes: 1 addition & 1 deletion src/pyodbccompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ inline TEXT_T* Text_Buffer(PyObject* o)

inline bool IntOrLong_Check(PyObject* o)
{
// A compatability function to check for an int or long. Python 3 doesn't differentate
// A compatibility function to check for an int or long. Python 3 doesn't differentate
// anymore.
// A compatibility function that determines if the object is a string, based on the version of Python.
// For Python 2, an ASCII or Unicode string is allowed. For Python 3, it must be a Unicode object.
Expand Down
2 changes: 1 addition & 1 deletion src/textenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ PyObject* TextEnc::Encode(PyObject* obj) const
// REVIEW: Issue #206. I am not sure what is going on here, but PyCodec_Encode
// sometimes returns bytes but *also* sets an exception saying "'ascii' codec can't
// encode characters...". I assume the ascii is from my sys encoding, but it seems to
// be a superflous error. Since Cursor.fetchall() looks for exceptions this extraneous
// be a superfluous error. Since Cursor.fetchall() looks for exceptions this extraneous
// error causes us to throw an exception.
//
// I'm putting in a work around but we should track down the root cause and report it
Expand Down
12 changes: 6 additions & 6 deletions tests2/dbapi20.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
# - Now a subclass of TestCase, to avoid requiring the driver stub
# to use multiple inheritance
# - Reversed the polarity of buggy test in test_description
# - Test exception heirarchy correctly
# - Test exception hierarchy correctly
# - self.populate is now self._populate(), so if a driver stub
# overrides self.ddl1 this change propogates
# overrides self.ddl1 this change propagates
# - VARCHAR columns now have a width, which will hopefully make the
# DDL even more portible (this will be reversed if it causes more problems)
# - cursor.rowcount being checked after various execute and fetchXXX methods
Expand Down Expand Up @@ -173,7 +173,7 @@ def test_paramstyle(self):

def test_Exceptions(self):
# Make sure required exceptions exist, and are in the
# defined heirarchy.
# defined hierarchy.
self.assertTrue(issubclass(self.driver.Warning,StandardError))
self.assertTrue(issubclass(self.driver.Error,StandardError))
self.assertTrue(
Expand Down Expand Up @@ -482,7 +482,7 @@ def test_fetchone(self):
self.assertRaises(self.driver.Error,cur.fetchone)

# cursor.fetchone should raise an Error if called after
# executing a query that cannnot return rows
# executing a query that cannot return rows
self.executeDDL1(cur)
self.assertRaises(self.driver.Error,cur.fetchone)

Expand All @@ -494,7 +494,7 @@ def test_fetchone(self):
self.assertTrue(cur.rowcount in (-1,0))

# cursor.fetchone should raise an Error if called after
# executing a query that cannnot return rows
# executing a query that cannot return rows
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
self.table_prefix
))
Expand Down Expand Up @@ -782,7 +782,7 @@ def test_setoutputsize_basic(self):
con.close()

def test_setoutputsize(self):
# Real test for setoutputsize is driver dependant
# Real test for setoutputsize is driver dependent
raise NotImplementedError,'Driver need to override this test'

def test_None(self):
Expand Down
4 changes: 2 additions & 2 deletions tests2/sqlservertests.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ def test_xml_str(self):
#
# When we read it out of the database, all we know is that it is XML
# and we don't know how it was encoded so we don't know how to decode
# it. Since almost everyone treats XML as Unicode nowdays, we're going
# it. Since almost everyone treats XML as Unicode nowadays, we're going
# to decode XML as Unicode. Force your XML to Unicode before writing
# to the database. (Otherwise, set a global encoder for the XMl type.)
# to the database. (Otherwise, set a global encoder for the XML type.)
ascii = 'test'
val = unicode(ascii)
self.cursor.execute("create table t1(a xml)")
Expand Down
12 changes: 6 additions & 6 deletions tests3/dbapi20.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
# - Now a subclass of TestCase, to avoid requiring the driver stub
# to use multiple inheritance
# - Reversed the polarity of buggy test in test_description
# - Test exception heirarchy correctly
# - Test exception hierarchy correctly
# - self.populate is now self._populate(), so if a driver stub
# overrides self.ddl1 this change propogates
# overrides self.ddl1 this change propagates
# - VARCHAR columns now have a width, which will hopefully make the
# DDL even more portible (this will be reversed if it causes more problems)
# - cursor.rowcount being checked after various execute and fetchXXX methods
Expand Down Expand Up @@ -173,7 +173,7 @@ def test_paramstyle(self):

def test_Exceptions(self):
# Make sure required exceptions exist, and are in the
# defined heirarchy.
# defined hierarchy.
self.assertTrue(issubclass(self.driver.Warning,StandardError))
self.assertTrue(issubclass(self.driver.Error,StandardError))
self.assertTrue(
Expand Down Expand Up @@ -482,7 +482,7 @@ def test_fetchone(self):
self.assertRaises(self.driver.Error,cur.fetchone)

# cursor.fetchone should raise an Error if called after
# executing a query that cannnot return rows
# executing a query that cannot return rows
self.executeDDL1(cur)
self.assertRaises(self.driver.Error,cur.fetchone)

Expand All @@ -494,7 +494,7 @@ def test_fetchone(self):
self.assertTrue(cur.rowcount in (-1,0))

# cursor.fetchone should raise an Error if called after
# executing a query that cannnot return rows
# executing a query that cannot return rows
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
self.table_prefix
))
Expand Down Expand Up @@ -782,7 +782,7 @@ def test_setoutputsize_basic(self):
con.close()

def test_setoutputsize(self):
# Real test for setoutputsize is driver dependant
# Real test for setoutputsize is driver dependent
raise NotImplementedError,'Driver need to override this test'

def test_None(self):
Expand Down
2 changes: 1 addition & 1 deletion tests3/mysqltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_unicode_query(self):
# bit
#

# The MySQL driver maps BIT colums to the ODBC bit data type, but they aren't behaving quite like a Boolean value
# The MySQL driver maps BIT columns to the ODBC bit data type, but they aren't behaving quite like a Boolean value
# (which is what the ODBC bit data type really represents). The MySQL BOOL data type is just an alias for a small
# integer, so pyodbc can't recognize it and map it back to True/False.
#
Expand Down
2 changes: 1 addition & 1 deletion tests3/sqlitetests.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_bigint(self):
self.assertEqual(result, input)

def test_negative_bigint(self):
# Issue 186: BIGINT problem on 32-bit architeture
# Issue 186: BIGINT problem on 32-bit architecture
input = -430000000
self.cursor.execute("create table t1(d bigint)")
self.cursor.execute("insert into t1 values (?)", input)
Expand Down

0 comments on commit 7aaca60

Please sign in to comment.