diff --git a/AutoDuck/makedfromi.py b/AutoDuck/makedfromi.py index 4fd2f44ac..53edf0111 100644 --- a/AutoDuck/makedfromi.py +++ b/AutoDuck/makedfromi.py @@ -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 diff --git a/AutoDuck/py2d.py b/AutoDuck/py2d.py index 647fb7121..2b2d779b8 100644 --- a/AutoDuck/py2d.py +++ b/AutoDuck/py2d.py @@ -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 "" diff --git a/CHANGES.txt b/CHANGES.txt index 82cf59213..d02c6fcae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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) @@ -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 diff --git a/Pythonwin/contents.d b/Pythonwin/contents.d index 86101de59..581380465 100644 --- a/Pythonwin/contents.d +++ b/Pythonwin/contents.d @@ -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) -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 diff --git a/Pythonwin/pythondoc.h b/Pythonwin/pythondoc.h index d0c2811d2..fb5f4b13c 100644 --- a/Pythonwin/pythondoc.h +++ b/Pythonwin/pythondoc.h @@ -112,7 +112,7 @@ BOOL CPythonDocTemp

::OnSaveDocument(const TCHAR *fileName) // @pyparm string|fileName||The name of the file being saved. // @xref // @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; @@ -131,7 +131,7 @@ BOOL CPythonDocTemp

::OnOpenDocument(const TCHAR *fileName) // @pyvirtual int|PyCDocument|OnOpenDocument|Called by the MFC architecture. // @xref // @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."); @@ -155,7 +155,7 @@ BOOL CPythonDocTemp

::OnNewDocument() // @pyvirtual int|PyCDocument|OnNewDocument|Called by the MFC architecture. // @xref // @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(); @@ -182,7 +182,7 @@ void CPythonDocTemp

::OnCloseDocument() // @pyvirtual |PyCDocument|OnCloseDocument|Called by the MFC architecture. // @xref // @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(); @@ -215,7 +215,7 @@ void CPythonDocTemp

::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 BOOL CPythonDocTemp

::SaveModified() @@ -223,7 +223,7 @@ BOOL CPythonDocTemp

::SaveModified() // @pyvirtual int|PyCDocument|SaveModified|Called by the MFC architecture when a document is closed. // @xref // @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(); @@ -244,7 +244,7 @@ void CPythonDocTemp

::OnChangedViewList() // @pyvirtual int|PyCDocument|OnChangedViewList|Called by the MFC architecture when after a view is attached. // @xref // @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; diff --git a/Pythonwin/pywin/debugger/fail.py b/Pythonwin/pywin/debugger/fail.py index dbb5320ae..0afc70eb3 100644 --- a/Pythonwin/pywin/debugger/fail.py +++ b/Pythonwin/pywin/debugger/fail.py @@ -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() diff --git a/Pythonwin/pywin/framework/editor/editor.py b/Pythonwin/pywin/framework/editor/editor.py index facb5b23f..1095cbe97 100644 --- a/Pythonwin/pywin/framework/editor/editor.py +++ b/Pythonwin/pywin/framework/editor/editor.py @@ -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. diff --git a/Pythonwin/pywin/framework/editor/vss.py b/Pythonwin/pywin/framework/editor/vss.py index 4a772acef..fa3b51ed3 100644 --- a/Pythonwin/pywin/framework/editor/vss.py +++ b/Pythonwin/pywin/framework/editor/vss.py @@ -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 diff --git a/Pythonwin/pywin/framework/intpyapp.py b/Pythonwin/pywin/framework/intpyapp.py index acbd34cc1..de02fdace 100644 --- a/Pythonwin/pywin/framework/intpyapp.py +++ b/Pythonwin/pywin/framework/intpyapp.py @@ -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") diff --git a/Pythonwin/pywin/framework/startup.py b/Pythonwin/pywin/framework/startup.py index 3cc6c0169..ca7a44d87 100644 --- a/Pythonwin/pywin/framework/startup.py +++ b/Pythonwin/pywin/framework/startup.py @@ -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" diff --git a/Pythonwin/pywin/scintilla/keycodes.py b/Pythonwin/pywin/scintilla/keycodes.py index d94ccda47..12867080a 100644 --- a/Pythonwin/pywin/scintilla/keycodes.py +++ b/Pythonwin/pywin/scintilla/keycodes.py @@ -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 = [] diff --git a/Pythonwin/pywin/scintilla/view.py b/Pythonwin/pywin/scintilla/view.py index 99680f18e..0134f3151 100644 --- a/Pythonwin/pywin/scintilla/view.py +++ b/Pythonwin/pywin/scintilla/view.py @@ -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. diff --git a/Pythonwin/win32bitmap.cpp b/Pythonwin/win32bitmap.cpp index 157457063..0422fbf75 100644 --- a/Pythonwin/win32bitmap.cpp +++ b/Pythonwin/win32bitmap.cpp @@ -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); diff --git a/Pythonwin/win32dlg.cpp b/Pythonwin/win32dlg.cpp index 598aae410..6a0e2fecb 100644 --- a/Pythonwin/win32dlg.cpp +++ b/Pythonwin/win32dlg.cpp @@ -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; diff --git a/Pythonwin/win32virt.cpp b/Pythonwin/win32virt.cpp index 5d049fbf3..a53aa58a8 100644 --- a/Pythonwin/win32virt.cpp +++ b/Pythonwin/win32virt.cpp @@ -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)) { diff --git a/adodbapi/adodbapi.py b/adodbapi/adodbapi.py index 4e85bc525..a28b0941a 100644 --- a/adodbapi/adodbapi.py +++ b/adodbapi/adodbapi.py @@ -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." @@ -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 diff --git a/adodbapi/readme.txt b/adodbapi/readme.txt index 00f76f7c2..877c400cb 100644 --- a/adodbapi/readme.txt +++ b/adodbapi/readme.txt @@ -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. diff --git a/adodbapi/test/adodbapitest.py b/adodbapi/test/adodbapitest.py index 1b50e595f..90abfb3b4 100644 --- a/adodbapi/test/adodbapitest.py +++ b/adodbapi/test/adodbapitest.py @@ -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 ) @@ -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( diff --git a/adodbapi/test/dbapi20.py b/adodbapi/test/dbapi20.py index 5639e4c3c..ea920d42b 100644 --- a/adodbapi/test/dbapi20.py +++ b/adodbapi/test/dbapi20.py @@ -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] @@ -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 @@ -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)) diff --git a/adodbapi/test/setuptestframework.py b/adodbapi/test/setuptestframework.py index 65b99e990..deb9e78f3 100644 --- a/adodbapi/test/setuptestframework.py +++ b/adodbapi/test/setuptestframework.py @@ -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): diff --git a/build_env.md b/build_env.md index 4f616bf99..7e166c4d9 100644 --- a/build_env.md +++ b/build_env.md @@ -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 diff --git a/com/changes.txt b/com/changes.txt index f94adde87..27e387a8c 100644 --- a/com/changes.txt +++ b/com/changes.txt @@ -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 diff --git a/com/win32com/changes.txt b/com/win32com/changes.txt index 3b3a0588e..57734d924 100644 --- a/com/win32com/changes.txt +++ b/com/win32com/changes.txt @@ -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 diff --git a/com/win32com/server/policy.py b/com/win32com/server/policy.py index 0c1f92427..f4593b4b9 100644 --- a/com/win32com/server/policy.py +++ b/com/win32com/server/policy.py @@ -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) diff --git a/com/win32com/server/register.py b/com/win32com/server/register.py index 04ffdca37..760a65701 100644 --- a/com/win32com/server/register.py +++ b/com/win32com/server/register.py @@ -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" ) diff --git a/com/win32com/src/dllmain.cpp b/com/win32com/src/dllmain.cpp index bac646ece..de857ed84 100644 --- a/com/win32com/src/dllmain.cpp +++ b/com/win32com/src/dllmain.cpp @@ -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) diff --git a/com/win32com/src/univgw_dataconv.cpp b/com/win32com/src/univgw_dataconv.cpp index 23107d01d..520adb66b 100644 --- a/com/win32com/src/univgw_dataconv.cpp +++ b/com/win32com/src/univgw_dataconv.cpp @@ -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 diff --git a/com/win32comext/axdebug/documents.py b/com/win32comext/axdebug/documents.py index 560901fb4..b653fc4be 100644 --- a/com/win32comext/axdebug/documents.py +++ b/com/win32comext/axdebug/documents.py @@ -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. """ diff --git a/com/win32comext/axscript/client/pyscript.py b/com/win32comext/axscript/client/pyscript.py index fd7806073..e281d16a7 100644 --- a/com/win32comext/axscript/client/pyscript.py +++ b/com/win32comext/axscript/client/pyscript.py @@ -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 diff --git a/com/win32comext/axscript/demos/client/ie/demo_intro.htm b/com/win32comext/axscript/demos/client/ie/demo_intro.htm index 9987d8972..c02be1a6e 100644 --- a/com/win32comext/axscript/demos/client/ie/demo_intro.htm +++ b/com/win32comext/axscript/demos/client/ie/demo_intro.htm @@ -30,7 +30,7 @@

Known bugs and problems

  • Builtin objects such as MARQUEE are giving me grief. Objects accessed via forms are generally no problem.

  • 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. diff --git a/com/win32comext/bits/src/bits.cpp b/com/win32comext/bits/src/bits.cpp index f92868f55..6b973f893 100755 --- a/com/win32comext/bits/src/bits.cpp +++ b/com/win32comext/bits/src/bits.cpp @@ -30,7 +30,7 @@ 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); @@ -38,14 +38,14 @@ PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) 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)); } diff --git a/com/win32comext/shell/demos/servers/folder_view.py b/com/win32comext/shell/demos/servers/folder_view.py index f2d039a15..f00e383cc 100644 --- a/com/win32comext/shell/demos/servers/folder_view.py +++ b/com/win32comext/shell/demos/servers/folder_view.py @@ -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 diff --git a/com/win32comext/shell/src/PyIShellItem2.cpp b/com/win32comext/shell/src/PyIShellItem2.cpp index eb0c1cdcf..9637882cc 100644 --- a/com/win32comext/shell/src/PyIShellItem2.cpp +++ b/com/win32comext/shell/src/PyIShellItem2.cpp @@ -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)); diff --git a/ruff.toml b/ruff.toml index eab7fcce1..d90410034 100644 --- a/ruff.toml +++ b/ruff.toml @@ -44,7 +44,7 @@ extend-ignore = [ # Explicit re-exports is fine in __init__.py, still a code smell elsewhere. "__init__.py" = ["PLC0414"] # TODO: Make adodbapi changes in their own PRs -"adodbapi/*" = ["C4", "YTT301", "UP031", "UP032", "ISC002"] +"adodbapi/*" = ["C4", "YTT301", "UP031", "UP032"] [lint.isort] combine-as-imports = true diff --git a/win32/Demos/security/set_file_audit.py b/win32/Demos/security/set_file_audit.py index 324d72748..e46d05d77 100644 --- a/win32/Demos/security/set_file_audit.py +++ b/win32/Demos/security/set_file_audit.py @@ -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, diff --git a/win32/Lib/pywin32_testutil.py b/win32/Lib/pywin32_testutil.py index d9e517913..e2b1b8b3a 100644 --- a/win32/Lib/pywin32_testutil.py +++ b/win32/Lib/pywin32_testutil.py @@ -273,7 +273,7 @@ def _makeResult(self): return TestResult(self.stream, self.descriptions, self.verbosity) -# TestProgream subclass necessary just to get our TestRunner hooked up, +# TestProgram subclass necessary just to get our TestRunner hooked up, # which is necessary to get our TestResult hooked up *sob* class TestProgram(unittest.TestProgram): def runTests(self): @@ -282,7 +282,7 @@ def runTests(self): unittest.TestProgram.runTests(self) -# A convenient entry-point - if used, 'SKIPPED' exceptions will be supressed. +# A convenient entry-point - if used, 'SKIPPED' exceptions will be suppressed. def testmain(*args, **kw): new_kw = kw.copy() if "testLoader" not in new_kw: diff --git a/win32/Lib/win32cryptcon.py b/win32/Lib/win32cryptcon.py index 8d71996a0..92aac96eb 100644 --- a/win32/Lib/win32cryptcon.py +++ b/win32/Lib/win32cryptcon.py @@ -972,7 +972,7 @@ def GET_CMSG_ENCODING_TYPE(X): CMC_FAIL_BAD_REQUEST = 2 CMC_FAIL_BAD_TIME = 3 CMC_FAIL_BAD_CERT_ID = 4 -CMC_FAIL_UNSUPORTED_EXT = 5 +CMC_FAIL_UNSUPORTED_EXT = 5 # Yes Microsoft made a typo in "UNSUPPORTED" CMC_FAIL_MUST_ARCHIVE_KEYS = 6 CMC_FAIL_BAD_IDENTITY = 7 CMC_FAIL_POP_REQUIRED = 8 diff --git a/win32/Lib/win32pdhquery.py b/win32/Lib/win32pdhquery.py index 3f458e0a8..1d85dfbb2 100644 --- a/win32/Lib/win32pdhquery.py +++ b/win32/Lib/win32pdhquery.py @@ -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) diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py index fdd71c855..01aa08d79 100644 --- a/win32/Lib/win32timezone.py +++ b/win32/Lib/win32timezone.py @@ -463,7 +463,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 diff --git a/win32/scripts/regsetup.py b/win32/scripts/regsetup.py index da2f870e1..787228285 100644 --- a/win32/scripts/regsetup.py +++ b/win32/scripts/regsetup.py @@ -500,9 +500,9 @@ def RegisterShellInfo(searchPaths): # Using raw string so that all paths meant to be copied read correctly inline and when printed examples = r""" Examples: -"regsetup c:\wierd\spot\1 c:\wierd\spot\2" +"regsetup c:\weird\spot\1 c:\weird\spot\2" Attempts to setup the core Python. Looks in some standard places, -as well as the 2 wierd spots to locate the core Python files (eg, Python.exe, +as well as the 2 weird spots to locate the core Python files (eg, Python.exe, pythonXX.dll, the standard library and Win32 Extensions). "regsetup -a myappname . .\subdir" diff --git a/win32/src/PySECURITY_DESCRIPTOR.cpp b/win32/src/PySECURITY_DESCRIPTOR.cpp index 4ad9aa1d0..f21cfaae7 100644 --- a/win32/src/PySECURITY_DESCRIPTOR.cpp +++ b/win32/src/PySECURITY_DESCRIPTOR.cpp @@ -451,7 +451,7 @@ PyObject *PySECURITY_DESCRIPTOR::GetSecurityDescriptorOwner(PyObject *self, PyOb PyObject *PySECURITY_DESCRIPTOR::SetSecurityDescriptorOwner(PyObject *self, PyObject *args) { // @pyparm |sid||The sid to be set as owner in the security descriptor. - // @pyparm int|bOwnerDefaulted||Normally set to false since this explicitely set the owner. + // @pyparm int|bOwnerDefaulted||Normally set to false since this explicitly set the owner. BOOL bOwnerDefaulted; PySECURITY_DESCRIPTOR *This = (PySECURITY_DESCRIPTOR *)self; PSID NewOwnerSid = NULL; @@ -494,7 +494,7 @@ PyObject *PySECURITY_DESCRIPTOR::SetSecurityDescriptorOwner(PyObject *self, PyOb PyObject *PySECURITY_DESCRIPTOR::SetSecurityDescriptorGroup(PyObject *self, PyObject *args) { // @pyparm |sid||The group sid to be set in the security descriptor. - // @pyparm int|bOwnerDefaulted||Normally set to false since this explicitely set the owner. + // @pyparm int|bOwnerDefaulted||Normally set to false since this explicitly set the owner. BOOL bGroupDefaulted; PySECURITY_DESCRIPTOR *This = (PySECURITY_DESCRIPTOR *)self; PSECURITY_DESCRIPTOR psd = NULL; diff --git a/win32/src/PythonService.cpp b/win32/src/PythonService.cpp index 181c97b50..c6d8e1364 100644 --- a/win32/src/PythonService.cpp +++ b/win32/src/PythonService.cpp @@ -92,7 +92,7 @@ typedef struct { DWORD g_serviceProcessFlags = 0; // The global SCM dispatch table. A trailing NULL indicates to the SCM -// how many are used, so we allocate one extra for this sentinal +// how many are used, so we allocate one extra for this sentinel static SERVICE_TABLE_ENTRY DispatchTable[MAX_SERVICES + 1] = {{NULL, NULL}}; // A parallel array of Python information for the service. static PY_SERVICE_TABLE_ENTRY PythonServiceTable[MAX_SERVICES]; diff --git a/win32/src/win32file.i b/win32/src/win32file.i index 5b1b010d7..714aed513 100644 --- a/win32/src/win32file.i +++ b/win32/src/win32file.i @@ -2,7 +2,7 @@ // @doc %module win32file // An interface to the win32 File API's -// This module includes the tranactional NTFS operations introduced with +// This module includes the transactional NTFS operations introduced with // Vista. The transacted functions are not wrapped separately, but are invoked by // passing a transaction handle to the corresponding Unicode API function. // This makes it simple to convert a set of file operations into a transaction by @@ -1179,13 +1179,13 @@ static PyObject *myGetQueuedCompletionStatus(PyObject *self, PyObject *args) PyObject *myPostQueuedCompletionStatus(PyObject *self, PyObject *args) { PyObject *obHandle, *obOverlapped = NULL, *obkey=Py_None; - DWORD bytesTransfered = 0; + DWORD bytesTransferred = 0; ULONG_PTR key = 0; // @pyparm |handle||handle to an I/O completion port - // @pyparm int|numberOfbytes|0|value to return via GetQueuedCompletionStatus' first result + // @pyparm int|numberOfBytes|0|value to return via GetQueuedCompletionStatus' first result // @pyparm int|completionKey|0|value to return via GetQueuedCompletionStatus' second result // @pyparm |overlapped|None|value to return via GetQueuedCompletionStatus' third result - if (!PyArg_ParseTuple(args, "O|iOO", &obHandle, &bytesTransfered, &obkey, &obOverlapped)) + if (!PyArg_ParseTuple(args, "O|iOO", &obHandle, &bytesTransferred, &obkey, &obOverlapped)) return NULL; if (obkey!=Py_None) if (!PyWinLong_AsVoidPtr(obkey, (void **)&key)) @@ -1198,7 +1198,7 @@ PyObject *myPostQueuedCompletionStatus(PyObject *self, PyObject *args) return NULL; BOOL ok; Py_BEGIN_ALLOW_THREADS - ok = ::PostQueuedCompletionStatus(handle, bytesTransfered, key, pOverlapped); + ok = ::PostQueuedCompletionStatus(handle, bytesTransferred, key, pOverlapped); Py_END_ALLOW_THREADS if (!ok) return PyWin_SetAPIError("PostQueuedCompletionStatus"); @@ -4168,7 +4168,7 @@ py_ReplaceFile(PyObject *self, PyObject *args) void encryptedfilecontextdestructor(PyObject *obctxt){ if (!PyCapsule_IsValid(obctxt, NULL)) return; // should not happen, but maybe print a warning just in case ? - // Check if context has already been explicitely destroyed + // Check if context has already been explicitly destroyed // The capsule's context is set to this value in CloseEncryptedFileRaw if (PyCapsule_GetContext(obctxt) == INVALID_HANDLE_VALUE) return;