Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typos #2300

Merged
merged 7 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AutoDuck/makedfromi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def GetComments(line, lineNo, lines):
if len(data) != 2:
break
if data[0].strip():
break # Not a continutation!
break # Not a continuation!
if data[1].strip().startswith("@"):
# new command
break
Expand Down
2 changes: 1 addition & 1 deletion AutoDuck/py2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def format_desc(desc):
# 'first_para_of_docstring'
# '@comm next para of docstring'
# '@comm next para of docstring' ... etc
# BUT - also handling enbedded doctests, where we write
# BUT - also handling embedded doctests, where we write
# '@iex >>> etc.'
if not desc:
return ""
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ as the .chm file, certain MAPI libraries etc, and .exe installers.
* `win32com.client.build.error`
* `win32com.client.genpy.error`
* Add EnumDesktopWindows (#2219, @CristiFati)
* Marked `exc_type` and `exc_traceback` in `win32comext.axscript.client.error.AXScriptException.__init__` as deprecated. (#2236 , @Avasam)
* Marked `exc_type` and `exc_traceback` in `win32comext.axscript.client.error.AXScriptException.__init__` as deprecated. (#2236, @Avasam)
They are now unused and all information is taken from the `exc_value` parameter.
* Fixed non-overriden `pywin.scintilla.formatter.Formatter.ColorizeString` raising `TypeError` instead of `RuntimeError` due to too many parameters (#2216, @Avasam)
* Fixed broken since Python 3 tokenization in `win32comext.axdebug.codecontainer.pySourceCodeContainer.GetSyntaxColorAttributes` (#2216, @Avasam)
Expand Down Expand Up @@ -189,7 +189,7 @@ as the .chm file, certain MAPI libraries etc, and .exe installers.
* Use byte-string (`b""`) for constant bytes values instead of superfluous `.encode` calls (#2046, @Avasam)
* Cleaned up unused imports (#1986, #2051, #1990, #2124, #2126, @Avasam)
* Removed duplicated declarations, constants and definitions (#2050, #1950, #1990, @Avasam)
* Small generalized optimization by using augmented assignements (in-place operators) where possible (#2274, @Avasam)
* Small generalized optimization by using augmented assignments (in-place operators) where possible (#2274, @Avasam)
* General speed and size improvements due to all the removed code. (#2046, #1986, #2050, #1950, #2085, #2087, #2051, #1990, #2106, #2127, #2124, #2126, #2177, #2218, #2202, #2205, #2217)

### adodbapi
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/contents.d
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ it uses overrides the default. Thus, regardless of your preferences, if the fir
indent in the file is a tab, Pythonwin uses tabs for the entire file (and
similarly, uses spaces if the first block is indented with spaces)
<nl>
Things can appear to get wierd when editing a file with mixed tabs and spaces.
Things can appear to get weird when editing a file with mixed tabs and spaces.
Although mixed tabs and spaces in the same indent is evil, there are a number
of source files that have certain classes/functions indented with spaces, and others
that use tabs. The editor will not correctly adjust to the current block - whatever
Expand Down
14 changes: 7 additions & 7 deletions Pythonwin/pythondoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ BOOL CPythonDocTemp<P>::OnSaveDocument(const TCHAR *fileName)
// @pyparm string|fileName||The name of the file being saved.
// @xref <om PyCDocument.OnSaveDocument>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("OnSaveDocument", this);
if (helper.call(fileName)) {
int ret;
Expand All @@ -131,7 +131,7 @@ BOOL CPythonDocTemp<P>::OnOpenDocument(const TCHAR *fileName)
// @pyvirtual int|PyCDocument|OnOpenDocument|Called by the MFC architecture.
// @xref <om PyCDocument.OnOpenDocument>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("OnOpenDocument", this);
if (!helper.HaveHandler()) {
PyErr_SetString(ui_module_error, "PyCDocument::OnOpenDocument handler does not exist.");
Expand All @@ -155,7 +155,7 @@ BOOL CPythonDocTemp<P>::OnNewDocument()
// @pyvirtual int|PyCDocument|OnNewDocument|Called by the MFC architecture.
// @xref <om PyCDocument.OnNewDocument>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("OnNewDocument", this);
if (!helper.HaveHandler()) {
helper.release_full();
Expand All @@ -182,7 +182,7 @@ void CPythonDocTemp<P>::OnCloseDocument()
// @pyvirtual |PyCDocument|OnCloseDocument|Called by the MFC architecture.
// @xref <om PyCDocument.OnCloseDocument>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("OnCloseDocument", this);
if (helper.HaveHandler()) {
helper.call();
Expand Down Expand Up @@ -215,15 +215,15 @@ void CPythonDocTemp<P>::DeleteContents()
P::DeleteContents();
}
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
}
template <class P>
BOOL CPythonDocTemp<P>::SaveModified()
{
// @pyvirtual int|PyCDocument|SaveModified|Called by the MFC architecture when a document is closed.
// @xref <om PyCDocument.SaveModified>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("SaveModified", this);
if (!helper.HaveHandler()) {
helper.release_full();
Expand All @@ -244,7 +244,7 @@ void CPythonDocTemp<P>::OnChangedViewList()
// @pyvirtual int|PyCDocument|OnChangedViewList|Called by the MFC architecture when after a view is attached.
// @xref <om PyCDocument.OnChangedViewList>
// @comm If a handler is defined for this function, the base (MFC) function will not
// be called. If necessary, the handler must call this function explicitely.
// be called. If necessary, the handler must call this function explicitly.
CVirtualHelper helper("OnChangedViewList", this);
if (helper.HaveHandler() && helper.call()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/debugger/fail.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def b():
b = 1
pywin.debugger.set_trace()
# After importing or running this module, you are likely to be
# sitting at the next line. This is because we explicitely
# sitting at the next line. This is because we explicitly
# broke into the debugger using the "set_trace() function
# "pywin.debugger.brk()" is a shorter alias for this.
c()
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/editor/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# We now support reloading of externally modified documented
# (eg, presumably by some other process, such as source control or
# another editor.
# We also suport auto-loading of externally modified files.
# We also support auto-loading of externally modified files.
# - if the current document has not been modified in this
# editor, but has been modified on disk, then the file
# can be automatically reloaded.
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/editor/vss.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def CheckoutFile(fileName):
project, vssFname, database = rc
if g_sourceSafe is None:
g_sourceSafe = win32com.client.Dispatch("SourceSafe")
# SS seems a bit wierd. It defaults the arguments as empty strings, but
# SS seems a bit weird. It defaults the arguments as empty strings, but
# then complains when they are used - so we pass "Missing"
if not database:
database = pythoncom.Missing
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/intpyapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def OnFileLocate(self, id, code):
else:
win32ui.GetApp().OpenDocumentFile(newName)

# Display all the "options" proprety pages we can find
# Display all the "options" property pages we can find
def OnViewOptions(self, id, code):
win32ui.InitRichEdit()
sheet = dialog.PropertySheet("Pythonwin Options")
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
pywin.__path__[0] = win32ui.FullPath(pywin.__path__[0])
pywin.framework.__path__[0] = win32ui.FullPath(pywin.framework.__path__[0])

# make a few wierd sys values. This is so later we can clobber sys.argv to trick
# make a few weird sys values. This is so later we can clobber sys.argv to trick
# scripts when running under a GUI environment.

moduleName = "pywin.framework.intpyapp"
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/scintilla/keycodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_vk(chardesc):


def parse_key_name(name):
name += "-" # Add a sentinal
name += "-" # Add a sentinel
start = pos = 0
max = len(name)
toks = []
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/scintilla/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def CalculatePageRanges(self, dc, pInfo):
pageStart = self.FormatRange(dc, pageStart, textLen, rc, 0)
maxPage += 1
self.starts[maxPage] = pageStart
# And a sentinal for one page past the end
# And a sentinel for one page past the end
self.starts[maxPage + 1] = textLen
# When actually printing, maxPage doesn't have any effect at this late state.
# but is needed to make the Print Preview work correctly.
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/win32bitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ PyObject *ui_bitmap_load_bitmap_file(PyObject *self, PyObject *args)
return NULL;
}
*/
/* Attempt to load wierd bitmap format.
/* Attempt to load weird bitmap format.
if (bmFileHeader.bfOffBits) {
PyObject *args = Py_BuildValue("(i)", bmFileHeader.bfOffBits);
result = gui_call_object(seeker, args);
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/win32dlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ PyCDialog::~PyCDialog()
GlobalFree(hSaved);
}

ui_assoc_object::SetAssocInvalid(); // must call this explicitely, as I ignore SetAssocInvalid
ui_assoc_object::SetAssocInvalid(); // must call this explicitly, as I ignore SetAssocInvalid
Py_XDECREF(ddlist); // we can not have the pointer deleted at window destruction time
// for a dialog (as MFC still needs it after the dialog has completed
BOOL bManDeleteSave = bManualDelete;
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/win32virt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CVirtualHelper::CVirtualHelper(const char *iname, void *iassoc, EnumVirtualError
PyErr_Fetch(&t, &v, &tb);
handler = PyObject_GetAttrString(py_bob->virtualInst, (char *)iname);
if (handler) {
// explicitely check a method returned, else the classes
// explicitly check a method returned, else the classes
// delegation may cause a circular call chain.
if (!PyMethod_Check(handler)) {
if (!PyCFunction_Check(handler)) {
Expand Down
4 changes: 2 additions & 2 deletions adodbapi/adodbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def getIndexedValue(obj, index):
def make_COM_connecter():
try:
pythoncom.CoInitialize() # v2.1 Paj
c = Dispatch("ADODB.Connection") # connect _after_ CoIninialize v2.1.1 adamvan
c = Dispatch("ADODB.Connection") # connect _after_ CoInitialize v2.1.1 adamvan
except:
raise api.InterfaceError(
"Windows COM Error: Dispatch('ADODB.Connection') failed."
Expand Down Expand Up @@ -595,7 +595,7 @@ def _raiseCursorError(self, errorclass, errorvalue):
eh(self.connection, self, errorclass, errorvalue)

def build_column_info(self, recordset):
self.converters = [] # convertion function for each column
self.converters = [] # conversion function for each column
self.columnNames = {} # names of columns {lowercase name : number,...}
self._description = None

Expand Down
2 changes: 1 addition & 1 deletion adodbapi/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Try:
or:
adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = adodbapi.apibase.cvtFloat
or:
adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = write_your_own_convertion_function
adodbapi.apibase.variantConversions[adodbapi.ado_consts.adNumeric] = write_your_own_conversion_function
............
notes for 2.6.2:
The definitive source has been moved to https://github.com/mhammond/pywin32/tree/master/adodbapi.
Expand Down
4 changes: 2 additions & 2 deletions adodbapi/test/adodbapitest.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def testUserDefinedConversionForExactNumericTypes(self):
# now return strings
adodbapi.variantConversions[ado_consts.adNumeric] = adodbapi.cvtString
self.helpTestDataType("numeric(18,2)", "NUMBER", "3.45")
# now a completly weird user defined convertion
# now a completely weird user defined conversion
adodbapi.variantConversions[ado_consts.adNumeric] = (
lambda x: "!!This function returns a funny unicode string %s!!" % x
)
Expand All @@ -228,7 +228,7 @@ def testUserDefinedConversionForExactNumericTypes(self):
finally:
# now reset the converter to its original function
adodbapi.variantConversions[ado_consts.adNumeric] = (
oldconverter # Restore the original convertion function
oldconverter # Restore the original conversion function
)

def helpTestDataType(
Expand Down
18 changes: 9 additions & 9 deletions adodbapi/test/dbapi20.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env python
""" Python DB API 2.0 driver compliance unit test suite.
"""Python DB API 2.0 driver compliance unit test suite.

This software is Public Domain and may be used without restrictions.
This software is Public Domain and may be used without restrictions.

"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read the subject line with 'Anal Compliance' in it. All around
this is turning out to be a thoroughly unwholesome unit test."
"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read the subject line with 'Anal Compliance' in it. All around
this is turning out to be a thoroughly unwholesome unit test."

-- Ian Bicking
-- Ian Bicking
"""

__version__ = "$Revision: 1.15.0 $"[11:-2]
Expand Down Expand Up @@ -71,7 +71,7 @@
# - 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
# - VARCHAR columns now have a width, which will hopefully make the
Expand Down Expand Up @@ -198,7 +198,7 @@ def test_paramstyle(self):

def test_Exceptions(self):
# Make sure required exceptions exist, and are in the
# defined heirarchy.
# defined hierarchy.
if sys.version[0] == "3": # under Python 3 StardardError no longer exists
self.assertTrue(issubclass(self.driver.Warning, Exception))
self.assertTrue(issubclass(self.driver.Error, Exception))
Expand Down
2 changes: 1 addition & 1 deletion adodbapi/test/setuptestframework.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def makeadopackage(testfolder):
shutil.copy(os.path.join(adoPath, f), newpackage)
return testfolder
else:
raise OSError("Connot find source of adodbapi to test.")
raise OSError("Cannot find source of adodbapi to test.")


def makemdb(testfolder, mdb_name):
Expand Down
2 changes: 1 addition & 1 deletion build_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ where mc
```

(Note that the above process for 'mc' doesn't appear necessary for VS2017, but
markh hasn't tried with VS2019 - please share your experiences!)
@mhammond hasn't tried with VS2019 - please share your experiences!)

# Build

Expand Down
2 changes: 1 addition & 1 deletion com/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Dec 1, 96
win32com.pythoncom works (and is the "official" way!).
- Connection point support added. makepy will now generate code suitable
to be used as an OCX, or as a connection point sink.
Slightly wierd connection point demo (client and server!) is in demos\connect.py
Slightly weird connection point demo (client and server!) is in demos\connect.py
Note - All old OCX code will be broken. You must regenerate all
.py files, AND CHANGE ALL SUPPORT CODE (sorry!). Specifically, the
name of the class you should sub-class from will have changed - it
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Dec 1, 96
win32com.pythoncom works (and is the "official" way!).
- Connection point support added. makepy will now generate code suitable
to be used as an OCX, or as a connection point sink.
Slightly wierd connection point demo (client and server!) is in demos\connect.py
Slightly weird connection point demo (client and server!) is in demos\connect.py
Note - All old OCX code will be broken. You must regenerate all
.py files, AND CHANGE ALL SUPPORT CODE (sorry!). Specifically, the
name of the class you should sub-class from will have changed - it
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/server/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def _getidsofnames_(self, names, lcid):

# IDispatchEx support for policies. Most of the IDispathEx functionality
# by default will raise E_NOTIMPL. Thus it is not necessary for derived
# policies to explicitely implement all this functionality just to not implement it!
# policies to explicitly implement all this functionality just to not implement it!

def _GetDispID_(self, name, fdex):
return self._getdispid_(name, fdex)
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/server/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def RegisterClasses(*classes, **flags):
win32api.FindFiles(sys.argv[0])[0][8]
)[0]
except (IndexError, win32api.error):
# Can't find the script file - the user must explicitely set the _reg_... attribute.
# Can't find the script file - the user must explicitly set the _reg_... attribute.
raise TypeError(
"Can't locate the script hosting the COM object - please set _reg_class_spec_ in your object"
)
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ typedef HRESULT(WINAPI *PFNCoInitializeEx)(LPVOID pvReserved, DWORD dwCoInit);
// particular about the order of shutdown - in MAPI's case, you MUST
// do the CoUninit _before_ the MAPIUninit.
// These functions have logic so the Python programmer can call either
// the Init for Term function explicitely, and the framework will detect
// the Init for Term function explicitly, and the framework will detect
// it no longer needs doing.
// XXX - Needs more thought about threading implications.
HRESULT PyCom_CoInitializeEx(LPVOID reserved, DWORD dwInit)
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/src/univgw_dataconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ PyObject *dataconv_ReadFromInTuple(PyObject *self, PyObject *args)
default:
obArg = NULL;
PyErr_SetString(PyExc_TypeError, "Unknown/bad type description type!");
// barf here, we don't wtf they were thinking...
// barf here, we don't know wtf they were thinking...
break;
} // switch
} // if ARRAY
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/axdebug/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class CodeContainerProvider:
Given a Python file name (as the debugger knows it by) this will
return a CodeContainer interface suitable for use.

This provides a simple base imlpementation that simply supports
This provides a simple base implementation that simply supports
a dictionary of nodes and providers.
"""

Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/axscript/client/pyscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _FindAttribute_(self, attr):


class NamedScriptAttribute:
"An explicitely named object in an objects namespace"
"An explicitly named object in an objects namespace"

# Each named object holds a reference to one of these.
# Whenever a sub-item appears in a namespace, it is really one of these
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/axscript/demos/client/ie/demo_intro.htm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <H3>Known bugs and problems</H3>
<LI><P>Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally
no problem.
<LI><P>If you are trying to use Python with the Windows Scripting Host, note that
.pys files are not correct registered - you will need to explicitely
.pys files are not correct registered - you will need to explicitly
specify either cscript.exe or wscript.exe on the command line.
</UL>

Expand Down
Loading
Loading