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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
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/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 @@ -747,7 +747,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 @@ -596,7 +596,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 @@ -214,7 +214,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 @@ -229,7 +229,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
2 changes: 1 addition & 1 deletion adodbapi/test/setuptestframework.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def makeadopackage(testfolder):
sys.stdout = save
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 @@ -94,7 +94,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 @@ -101,7 +101,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
8 changes: 4 additions & 4 deletions com/win32comext/bits/src/bits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ void PyObject_FreeBG_FILE_RANGE_LIST(DWORD num, BG_FILE_RANGE *fr) {}

PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp)
{
// @object PyObject_FromBG_FILE_PROGRESS|A tuple of 3 elements (bytesTotal, bytesTransfered, completed), (int, int,
// @object PyObject_FromBG_FILE_PROGRESS|A tuple of 3 elements (bytesTotal, bytesTransferred, completed), (int, int,
// bool)
return Py_BuildValue("NNO", PyLong_FromLongLong(fp->BytesTotal), PyLong_FromLongLong(fp->BytesTransferred),
fp->Completed ? Py_True : Py_False);
}

PyObject *PyObject_FromBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp)
{
// @object PyObject_FromBG_JOB_PROGRESS|A tuple of 4 elements (bytesTotal, bytesTransfered, filesTotal,
// filesTransfered), all ints.
// @object PyObject_FromBG_JOB_PROGRESS|A tuple of 4 elements (bytesTotal, bytesTransferred, filesTotal,
// filesTransferred), all ints.
return Py_BuildValue("NNkk", PyLong_FromLongLong(jp->BytesTotal), PyLong_FromLongLong(jp->BytesTransferred),
jp->FilesTotal, jp->FilesTransferred);
}
PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs)
{
// @object BG_JOB_REPLY_PROGRESS|A tuple of 2 elements (bytesTotal, bytesTransfered), both ints.
// @object BG_JOB_REPLY_PROGRESS|A tuple of 2 elements (bytesTotal, bytesTransferred), both ints.
return Py_BuildValue("NN", PyLong_FromLongLong(jrs->BytesTotal), PyLong_FromLongLong(jrs->BytesTransferred));
}

Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/shell/demos/servers/folder_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def QueryContextMenu(self, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags):

def InvokeCommand(self, ci):
mask, hwnd, verb, params, dir, nShow, hotkey, hicon = ci
# this seems very convuluted, but it's what the sample does :)
# this seems very convoluted, but it's what the sample does :)
for verb_name, verb_id, flag in folderViewImplContextMenuIDs:
if isinstance(verb, int):
matches = verb == verb_id
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/shell/src/PyIShellItem2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ STDMETHODIMP PyGShellItem2::GetProperty(
PyObject *result;
/* ??? Something strange with the format:
If passing only a single object, and it's a tuple,
and you don't explicitely add the parens,
and you don't explicitly add the parens,
the tuple gets unpacked and passed as separate args ???
*/
HRESULT hr = InvokeViaPolicy("GetProperty", &result, "(N)", PyObject_FromSHCOLUMNID(&key));
Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/security/set_file_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
win32con.GENERIC_ALL,
my_sid,
)
## keep dir from inheriting any permissions so it only has ACEs explicitely set here
## keep dir from inheriting any permissions so it only has ACEs explicitly set here
win32security.SetNamedSecurityInfo(
dir_name,
SE_FILE_OBJECT,
Expand Down
4 changes: 2 additions & 2 deletions win32/Lib/win32pdhquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,10 @@ def collectdatafor(self, totalperiod, period=1):
def collectdatawhile(self, period=1):
"""
Threaded collection of performance data:
This method sets up a simple semaphor system for signalling
This method sets up a simple semaphore system for signalling
when you would like to start and stop a threaded data collection
method. The collection runs every period seconds until the
semaphor attribute is set to a non-true value (which normally
semaphore attribute is set to a non-true value (which normally
should be done by calling query.collectdatawhile_stop() .)
e.g.:
query.collectdatawhile(2)
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/win32timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _locate_day(year, cutoff):
"""
# MS stores Sunday as 0, Python datetime stores Monday as zero
target_weekday = (cutoff.day_of_week + 6) % 7
# For SYSTEMTIMEs relating to time zone inforamtion, cutoff.day
# For SYSTEMTIMEs relating to time zone information, cutoff.day
# is the week of the month
week_of_month = cutoff.day
# so the following is the first day of that week
Expand Down
Loading
Loading