Skip to content

Commit

Permalink
Fixed tons of quote-related typos in strings, docs and comments (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Jun 4, 2024
1 parent 41efba1 commit 32002e2
Show file tree
Hide file tree
Showing 191 changed files with 1,664 additions and 1,884 deletions.
2 changes: 1 addition & 1 deletion AutoDuck/BuildHHP.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def handle_globs(lGlobs):
# else we have a trailing slash - it means we _expect_ it to be a patch as-is.
assert (
os.path.isdir(sCommonPrefix) and sCommonPrefix[-1] == "\\"
), "commonprefix splitting aint gunna work!"
), "commonprefix splitting ain't gunna work!"
print("sCommonPrefix=", sCommonPrefix)
# Ok, now remove this common prefix from every file:
lRelativeFiles = []
Expand Down
2 changes: 1 addition & 1 deletion AutoDuck/Dump2HHC.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def genTOC(cats, output, title, target):
**locals()
)
)
# Dont show 'children' for objects - params etc don't need their own child nodes!
# Don't show 'children' for objects - params etc don't need their own child nodes!
_genItemsFromDict(cat.objects, cat, output, target, do_children=0)
output.write(
"""
Expand Down
2 changes: 1 addition & 1 deletion AutoDuck/makedfromi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def GetComments(line, lineNo, lines):
break
doc = doc + "\n// " + data[1].strip()
lineNo = lineNo + 1
# This line doesnt match - step back
# This line doesn't match - step back
lineNo = lineNo - 1
return doc, lineNo

Expand Down
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Coming in build 307, as yet unreleased
* Fixed a `TypeError` due to incorrect kwargs in `win32comext.axscript.client.pydumper.Register` (#2216, @Avasam)
* Fixed error reporting of file copy failure for for installing debug dlls (#2216, @Avasam)
* Fixed `py.exe -m win32verstamp` command and other quote typos caused by Implied String Concatenation (#2225, @Avasam)
* Fixed tons of quote-related typos in strings, docs and comments (#2271 , @Avasam)
* Fixed VT_SAFEARRAY(VT_RECORD) which were missing the last element (#2247)
* Fixed `MFC redist DLLs not found` by preferring corresponding version but accepting different version (#2248, @andreabravetti)
* Fixed `pywintypes.error: (5, 'RegOpenKeyEx', 'Access is denied.')` when running service with debug parameter and no elevation (#2238, @jmartens)
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/Win32uiHostGlue.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ inline BOOL Win32uiHostGlue::ApplicationInit(const TCHAR *cmd, const TCHAR *addi
Py_Initialize();
}
// Make sure the statically linked win32ui is the one Python sees
// (and doesnt go searching for a new one)
// (and doesn't go searching for a new one)

PyInit_win32ui();
return Win32uiApplicationInit(this, cmd, additionalPaths);
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/contents.d
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ was used for the first block is used for the entire file.
Another common scenario where things go wrong is when pasting code into a new file.
You create a new file (which sets the tabs to your defaults), then
paste in a huge chunk of code that is indented differently. The editor is still using
the defaults, which dont reflect the code that now exists in the buffer.
the defaults, which don't reflect the code that now exists in the buffer.
<nl>
The "tab-timmy" shows up these problems very quickly, and you can quickly toggle the
current tab settings by pressing Ctrl+T, or change the indent width by pressing Ctrl+U.
Expand Down
6 changes: 3 additions & 3 deletions Pythonwin/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ BOOL CInProcApp::InitInstance()
// Check that we have a valid CWinApp object to use.
bool CheckGoodWinApp()
{
// Shouldnt need special symbols now that we delay the creation.
// shouldn't need special symbols now that we delay the creation.
// If the host exports a special symbol, then
// dont create a host app.
// don't create a host app.
// HMODULE hModule = GetModuleHandle(NULL);
// BOOL hasSymbol = (GetProcAddress(hModule, "NoCreateWinApp") != NULL);
if (AfxGetApp() == NULL) { // && !hasSymbol) {
Expand Down Expand Up @@ -206,7 +206,7 @@ extern "C" __declspec(dllexport) int __stdcall DllMainwin32ui(HINSTANCE hInstanc

if (pCreatedApp) {
pCreatedApp->CleanupMainWindow();
// We dont call ExitInstance, as the InitInstance we called could
// We don't call ExitInstance, as the InitInstance we called could
// not have possibly called back to Python, as the Python app object
// could not have been created. Let the Python code manage if it wants!
Win32uiFinalize();
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pythonwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ BOOL CPythonWinApp::InitInstance()
{
if (!glue.InitInstance())
return FALSE;
// dialog based apps dont have a message pump.
// dialog based apps don't have a message pump.
return m_pMainWnd && !m_pMainWnd->IsKindOf(RUNTIME_CLASS(CDialog));
}
int CPythonWinApp::ExitInstance()
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/app/helloapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


# The main frame.
# Does almost nothing at all - doesnt even create a child window!
# Does almost nothing at all - doesn't even create a child window!
class HelloWindow(window.Wnd):
def __init__(self):
# The window.Wnd ctor creates a Window object, and places it in
Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/Demos/dibdemo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A demo which creates a view and a frame which displays a PPM format bitmap
#
# This hasnnt been run in a while, as I dont have many of that format around!
# This hasnnt been run in a while, as I don't have many of that format around!

import win32api
import win32con
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(self, filename, *bPBM):
rowcollist = f.readline().split()
cols = int(rowcollist[0])
rows = int(rowcollist[1])
f.readline() # whats this one?
f.readline() # what's this one?
dib.LoadPBMData(f, (cols, rows))
else:
dib.LoadWindowsFormatFile(f)
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/hiertest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


# directory listbox
# This has obvious limitations - doesnt track subdirs, etc. Demonstrates
# This has obvious limitations - doesn't track subdirs, etc. Demonstrates
# simple use of Python code for querying the tree as needed.
# Only use strings, and lists of strings (from curdir())
class DirHierList(hierlist.HierList):
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/ocx/flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, url=None):
self.url = regutil.GetRegisteredHelpFile("Main Python Documentation")
else:
self.url = url
pass # Dont call base class doc/view version...
pass # Don't call base class doc/view version...

def Create(self, title, rect=None, parent=None):
style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW
Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/Demos/ocx/msoffice.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def OnSetFocus(self, msg):
wnd = item.GetInPlaceWindow()
if wnd is not None:
wnd.SetFocus()
return 0 # Dont get the base version called.
return 0 # Don't get the base version called.
return 1 # Call the base version.

def OnSize(self, params):
Expand All @@ -115,7 +115,7 @@ class WordFrame(window.MDIChildWnd):
def __init__(self, doc=None):
self._obj_ = win32ui.CreateMDIChild()
self._obj_.AttachObject(self)
# Dont call base class doc/view version...
# Don't call base class doc/view version...

def Create(self, title, rect=None, parent=None):
WordModule = gencache.EnsureModule(
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/ocx/ocxtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def OnOK(self):
#
class OCXFrame(window.MDIChildWnd):
def __init__(self):
pass # Dont call base class doc/view version...
pass # Don't call base class doc/view version...

def Create(self, controlClass, title, rect=None, parent=None):
style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/Demos/ocx/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, url=None):
self.url = "http://www.python.org"
else:
self.url = url
pass # Dont call base class doc/view version...
pass # Don't call base class doc/view version...

def Create(self, title, rect=None, parent=None):
style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW
Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/Demos/threadedgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def OnPrepareDC(self, dc, printinfo):

class FontFrame(window.MDIChildWnd):
def __init__(self):
pass # Dont call base class doc/view version...
pass # Don't call base class doc/view version...

def Create(self, title, rect=None, parent=None):
style = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_OVERLAPPEDWINDOW
Expand Down Expand Up @@ -134,7 +134,7 @@ def ExitInstance(self):

class ThreadedFontFrame(window.MDIChildWnd):
def __init__(self):
pass # Dont call base class doc/view version...
pass # Don't call base class doc/view version...
self.thread = None

def Create(self, title, rect=None, parent=None):
Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/Demos/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def OnCreateClient(self, cp, context):
# handlers for toolbar buttons
self.HookCommand(self.OnPrevious, 401)
self.HookCommand(self.OnNext, 402)
# Its not necessary for us to hook both of these - the
# It's not necessary for us to hook both of these - the
# common controls should fall-back all by themselves.
# Indeed, given we hook TTN_NEEDTEXTW, commctrl.TTN_NEEDTEXTA
# will not be called.
Expand Down Expand Up @@ -85,7 +85,7 @@ def OnPrevious(self, id, cmd):
\r
The first item's tooltips is provided by Python code.\r
\r
(Dont close the window with the toolbar in a floating state - it may not re-appear!)\r
(Don't close the window with the toolbar in a floating state - it may not re-appear!)\r
"""


Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/debugger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def set_trace():
return # App closing

if d.stopframe != d.botframe:
# If im not "running"
# If I'm not "running"
return

sys.settrace(None) # May be hooked
Expand Down
14 changes: 7 additions & 7 deletions Pythonwin/pywin/debugger/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def GetSubList(self):
self.last_stack.append((frame, lineno))
if (
frame is debugger.userbotframe
): # Dont bother showing frames below our bottom frame.
): # Don't bother showing frames below our bottom frame.
break
for frame, lineno in self.last_stack:
ret.append(HierFrameItem(frame, debugger))
Expand Down Expand Up @@ -455,7 +455,7 @@ def OnListEndLabelEdit(self, std, extra):
def DeleteSelected(self):
try:
num = self.GetNextItem(-1, commctrl.LVNI_SELECTED)
if num < self.GetItemCount() - 1: # We cant delete the last
if num < self.GetItemCount() - 1: # We can't delete the last
self.DeleteItem(num)
except win32ui.error:
win32api.MessageBeep()
Expand Down Expand Up @@ -608,7 +608,7 @@ def close(self, frameShutdown=0):
SetInteractiveContext(None, None)

frame = win32ui.GetMainFrame()
# Hide the debuger toolbars (as they wont normally form part of the main toolbar state.
# Hide the debuger toolbars (as they won't normally form part of the main toolbar state.
for id, klass, float in DebuggerDialogInfos:
try:
tb = frame.GetControlBar(id)
Expand All @@ -623,7 +623,7 @@ def close(self, frameShutdown=0):
return 1

def StopDebuggerPump(self):
assert self.pumping, "Can't stop the debugger pump if Im not pumping!"
assert self.pumping, "Can't stop the debugger pump if I'm not pumping!"
# After stopping a pump, I may never return.
if self.GUIAboutToFinishInteract():
self.pumping = 0
Expand Down Expand Up @@ -674,7 +674,7 @@ def cmdloop(self):
self.GUIAboutToBreak()

def print_stack_entry(self, frame):
# We dont want a stack printed - our GUI is better :-)
# We don't want a stack printed - our GUI is better :-)
pass

def user_return(self, frame, return_value):
Expand Down Expand Up @@ -828,7 +828,7 @@ def set_trace(self):
self.userbotframe = None
while frame:
# scriptutils.py creates a local variable with name
# '_debugger_stop_frame_', and we dont go past it
# '_debugger_stop_frame_', and we don't go past it
# (everything above this is Pythonwin framework code)
if "_debugger_stop_frame_" in frame.f_locals:
self.userbotframe = frame
Expand Down Expand Up @@ -883,7 +883,7 @@ def RespondDebuggerState(self, state):
win32ui.LoadString(win32ui.IDR_MAINFRAME) + title
)
if self.debuggerState == DBGSTATE_QUITTING and state != DBGSTATE_NOT_DEBUGGING:
print("Ignoring state change cos Im trying to stop!", state)
print("Ignoring state change cos I'm trying to stop!", state)
return
self.debuggerState = state
try:
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 @@ -3,7 +3,7 @@
# The ONLY purpose for this script is testing/demoing the
# Pythonwin debugger package.

# It does nothing useful, and it even doesnt do that!
# It does nothing useful, and it even doesn't do that!

import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Alt+I = WindowBack # Toggle back to previous window.
Home = InteractiveHome # A sample Event defined in this file.
Shift+Home = InteractiveHomeExtend # A sample Event defined in this file.

# When docked, the Ctrl+Tab and Shift+Ctrl+Tab keys dont work as expected.
# When docked, the Ctrl+Tab and Shift+Ctrl+Tab keys don't work as expected.
Ctrl+Tab = MDINext
Ctrl+Shift+Tab = MDIPrev

Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/docking/DockingBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def OnLButtonUp(self, msg):
if not self.bTracking:
return 1 # pass it on.
self.StopTracking(1)
return 0 # Dont pass on
return 0 # Don't pass on

def OnLButtonDown(self, msg):
# UINT nFlags, CPoint point)
Expand Down Expand Up @@ -374,7 +374,7 @@ def OnMouseMove(self, msg):
self.rectTracker = OffsetRect(self.rectTracker, (pt[0] - cpt[0], 0))
self.OnInvertTracker(self.rectTracker)

return 0 # Dont pass it on.
return 0 # Don't pass it on.

# def OnBarStyleChange(self, old, new):

Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/framework/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def OnHelp(self, id, code):

def DoLoadModules(self, modules):
# XXX - this should go, but the debugger uses it :-(
# dont do much checking!
# don't do much checking!
for module in modules:
__import__(module)

Expand Down Expand Up @@ -270,7 +270,7 @@ def OnDropFiles(self, msg):
# No longer used by Pythonwin, as the C++ code has this same basic functionality
# but handles errors slightly better.
# It all still works, tho, so if you need similar functionality, you can use it.
# Therefore I havent deleted this code completely!
# Therefore I haven't deleted this code completely!
# def CallbackManager( self, ob, args = () ):
# """Manage win32 callbacks. Trap exceptions, report on them, then return 'All OK'
# to the frame-work. """
Expand Down
6 changes: 3 additions & 3 deletions Pythonwin/pywin/framework/bitmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def OnCreateClient(self, createparams, context):
borderX = win32api.GetSystemMetrics(win32con.SM_CXFRAME)
borderY = win32api.GetSystemMetrics(win32con.SM_CYFRAME)
titleY = win32api.GetSystemMetrics(win32con.SM_CYCAPTION) # includes border
# try and maintain default window pos, else adjust if cant fit
# try and maintain default window pos, else adjust if can't fit
# get the main client window dimensions.
mdiClient = win32ui.GetMainFrame().GetWindow(win32con.GW_CHILD)
clientWindowRect = mdiClient.ScreenToClient(mdiClient.GetWindowRect())
Expand Down Expand Up @@ -138,7 +138,7 @@ def MatchDocType(self, fileName, fileType):
)
win32ui.GetApp().AddDocTemplate(bitmapTemplate)

# This works, but just didnt make it through the code reorg.
# This works, but just didn't make it through the code reorg.
# class PPMBitmap(Bitmap):
# def LoadBitmapFile(self, file ):
# magic=file.readline()
Expand All @@ -147,7 +147,7 @@ def MatchDocType(self, fileName, fileType):
# rowcollist=file.readline().split()
# cols=int(rowcollist[0])
# rows=int(rowcollist[1])
# file.readline() # whats this one?
# file.readline() # what's this one?
# self.bitmap.LoadPPMFile(file,(cols,rows))


Expand Down
4 changes: 2 additions & 2 deletions Pythonwin/pywin/framework/editor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# We used to support optional editors - eg, color or non-color.
#
# This really isnt necessary with Scintilla, and scintilla
# This really isn't necessary with Scintilla, and scintilla
# is getting so deeply embedded that it was too much work.

import win32ui
Expand Down Expand Up @@ -45,7 +45,7 @@ def LoadDefaultEditor():
## del rc
##
## try:
## # Try and load the default one - dont catch errors here.
## # Try and load the default one - don't catch errors here.
## if mod is None:
## prefModule = "pywin.framework.editor.color.coloreditor"
## mod = __import__(prefModule)
Expand Down
6 changes: 3 additions & 3 deletions Pythonwin/pywin/framework/editor/color/coloreditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ def DoConfigChange(self):
# Tab size can never be guessed - set at user preference.
ext.config(usetabs=usetabs, indentwidth=indentwidth, tabwidth=tabSize)
else:
# Dont want smart-tabs - just set the options!
# Don't want smart-tabs - just set the options!
ext.config(usetabs=bUseTabs, tabwidth=tabSize, indentwidth=indentSize)
self.SCISetIndent(indentSize)
self.SCISetTabWidth(tabSize)

def OnDebuggerStateChange(self, state):
if state == dbgcon.DBGSTATE_NOT_DEBUGGING:
# Indicate breakpoints arent really usable.
# Indicate breakpoints aren't really usable.
# Not quite white - useful when no marker margin, so set as background color.
self.SCIMarkerSetBack(MARKER_BREAKPOINT, win32api.RGB(0xEF, 0xEF, 0xEF))
else:
Expand All @@ -287,7 +287,7 @@ def _EndUserStateChange(self, info):
scrollOff = info[1] - self.GetFirstVisibleLine()
if scrollOff:
self.LineScroll(scrollOff)
# Make sure we dont reset the cursor beyond the buffer.
# Make sure we don't reset the cursor beyond the buffer.
max = self.GetTextLength()
newPos = min(info[0][0], max), min(info[0][1], max)
self.SetSel(newPos)
Expand Down
Loading

0 comments on commit 32002e2

Please sign in to comment.