Skip to content

Commit 31a6ff7

Browse files
authored
Remove trailing whitespaces not handled by black (#2222)
1 parent 518ac84 commit 31a6ff7

13 files changed

Lines changed: 62 additions & 68 deletions

File tree

Pythonwin/pywin/dialogs/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""login -- PythonWin user ID and password dialog box
22
3-
(Adapted from originally distributed with Mark Hammond's PythonWin -
3+
(Adapted from originally distributed with Mark Hammond's PythonWin -
44
this now replaces it!)
55
66
login.GetLogin() displays a modal "OK/Cancel" dialog box with input

com/win32com/makegw/makegw.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
33
This module will generate a C++/Python binding for a specific COM
44
interface.
5-
5+
66
Can be run from command line (passing required arguments) or the old way
77
(start Python, import this module, change to the directory where the generated code
88
should be written, and run the public function).
9-
9+
1010
This module is capable of generating both 'Interfaces' (ie, Python
1111
client side support for the interface) and 'Gateways' (ie, Python
1212
server side support for the interface). Many COM interfaces are useful
1313
both as Client and Server. Other interfaces, however, really only make
1414
sense to implement one side or the other. For example, it would be pointless
1515
for Python to implement Server side for 'IRunningObjectTable', unless we were
1616
implementing core COM for an operating system in Python (hey - now there's an idea!)
17-
17+
1818
Most COM interface code is totally boiler-plate - it consists of
1919
converting arguments, dispatching the call to Python, and processing
2020
any result values.
21-
21+
2222
This module automates the generation of such code. It has the ability to
2323
parse a .H file generated by the MIDL tool (ie, almost all COM .h files)
2424
and build almost totally complete C++ code.
25-
25+
2626
The module understands some of the well known data types, and how to
2727
convert them. There are only a couple of places where hand-editing is
2828
necessary, as detailed below:
@@ -43,7 +43,6 @@
4343
* FAILED(scode) for the interface still has valid data to return (by default,
4444
the code generated does not process the return values, and raise an exception
4545
to Python/COM
46-
4746
"""
4847

4948
import argparse

com/win32com/makegw/makegwenum.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _write_enumgw_cpp(f, interface):
226226
STDMETHODIMP PyGEnum{enumtype}::GetIDsOfNames(REFIID refiid, OLECHAR FAR* FAR* rgszNames, UINT cNames, LCID lcid, DISPID FAR* rgdispid) {{return PyGatewayBase::GetIDsOfNames( refiid, rgszNames, cNames, lcid, rgdispid);}}
227227
STDMETHODIMP PyGEnum{enumtype}::Invoke(DISPID dispid, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* params, VARIANT FAR* pVarResult, EXCEPINFO FAR* pexcepinfo, UINT FAR* puArgErr) {{return PyGatewayBase::Invoke( dispid, riid, lcid, wFlags, params, pVarResult, pexcepinfo, puArgErr);}}
228228
229-
STDMETHODIMP PyGEnum{enumtype}::Next(
229+
STDMETHODIMP PyGEnum{enumtype}::Next(
230230
/* [in] */ ULONG celt,
231231
/* [length_is][size_is][out] */ {argdeclare},
232232
/* [out] */ ULONG __RPC_FAR *pCeltFetched)
@@ -273,7 +273,7 @@ def _write_enumgw_cpp(f, interface):
273273
return PyCom_HandleIEnumNoSequence(IID_IEnum{enumtype});
274274
}}
275275
276-
STDMETHODIMP PyGEnum{enumtype}::Skip(
276+
STDMETHODIMP PyGEnum{enumtype}::Skip(
277277
/* [in] */ ULONG celt)
278278
{{
279279
PY_GATEWAY_METHOD;
@@ -286,7 +286,7 @@ def _write_enumgw_cpp(f, interface):
286286
return InvokeViaPolicy("Reset");
287287
}}
288288
289-
STDMETHODIMP PyGEnum{enumtype}::Clone(
289+
STDMETHODIMP PyGEnum{enumtype}::Clone(
290290
/* [out] */ IEnum{enumtype} __RPC_FAR *__RPC_FAR *ppEnum)
291291
{{
292292
PY_GATEWAY_METHOD;

com/win32com/makegw/makegwparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Each argument knows how to use Py_BuildValue or Py_ParseTuple to
99
exchange itself with Python.
10-
10+
1111
See the @win32com.makegw@ module for information in building a COM
1212
interface
1313
"""

com/win32com/server/exception.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
To better support COM exceptions, the framework allows for an instance to be
66
raised. This instance may have a certain number of known attributes, which are
77
translated into COM exception details.
8-
8+
99
This means, for example, that Python could raise a COM exception that includes details
1010
on a Help file and location, and a description for the user.
11-
12-
This module provides a class which provides the necessary attributes.
1311
12+
This module provides a class which provides the necessary attributes.
1413
"""
1514

1615
import sys

com/win32com/server/policy.py

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,69 @@
1-
"""Policies
1+
"""Policies
22
33
Note that Dispatchers are now implemented in "dispatcher.py", but
44
are still documented here.
55
66
Policies
77
8-
A policy is an object which manages the interaction between a public
9-
Python object, and COM . In simple terms, the policy object is the
10-
object which is actually called by COM, and it invokes the requested
11-
method, fetches/sets the requested property, etc. See the
8+
A policy is an object which manages the interaction between a public
9+
Python object, and COM . In simple terms, the policy object is the
10+
object which is actually called by COM, and it invokes the requested
11+
method, fetches/sets the requested property, etc. See the
1212
@win32com.server.policy.CreateInstance@ method for a description of
1313
how a policy is specified or created.
1414
15-
Exactly how a policy determines which underlying object method/property
16-
is obtained is up to the policy. A few policies are provided, but you
17-
can build your own. See each policy class for a description of how it
15+
Exactly how a policy determines which underlying object method/property
16+
is obtained is up to the policy. A few policies are provided, but you
17+
can build your own. See each policy class for a description of how it
1818
implements its policy.
1919
20-
There is a policy that allows the object to specify exactly which
21-
methods and properties will be exposed. There is also a policy that
22-
will dynamically expose all Python methods and properties - even those
20+
There is a policy that allows the object to specify exactly which
21+
methods and properties will be exposed. There is also a policy that
22+
will dynamically expose all Python methods and properties - even those
2323
added after the object has been instantiated.
2424
2525
Dispatchers
2626
27-
A Dispatcher is a level in front of a Policy. A dispatcher is the
28-
thing which actually receives the COM calls, and passes them to the
29-
policy object (which in turn somehow does something with the wrapped
27+
A Dispatcher is a level in front of a Policy. A dispatcher is the
28+
thing which actually receives the COM calls, and passes them to the
29+
policy object (which in turn somehow does something with the wrapped
3030
object).
3131
3232
It is important to note that a policy does not need to have a dispatcher.
33-
A dispatcher has the same interface as a policy, and simply steps in its
34-
place, delegating to the real policy. The primary use for a Dispatcher
35-
is to support debugging when necessary, but without imposing overheads
33+
A dispatcher has the same interface as a policy, and simply steps in its
34+
place, delegating to the real policy. The primary use for a Dispatcher
35+
is to support debugging when necessary, but without imposing overheads
3636
when not (ie, by not using a dispatcher at all).
3737
38-
There are a few dispatchers provided - "tracing" dispatchers which simply
39-
prints calls and args (including a variation which uses
40-
win32api.OutputDebugString), and a "debugger" dispatcher, which can
38+
There are a few dispatchers provided - "tracing" dispatchers which simply
39+
prints calls and args (including a variation which uses
40+
win32api.OutputDebugString), and a "debugger" dispatcher, which can
4141
invoke the debugger when necessary.
4242
4343
Error Handling
4444
4545
It is important to realise that the caller of these interfaces may
46-
not be Python. Therefore, general Python exceptions and tracebacks aren't
46+
not be Python. Therefore, general Python exceptions and tracebacks aren't
4747
much use.
4848
49-
In general, there is an COMException class that should be raised, to allow
49+
In general, there is an COMException class that should be raised, to allow
5050
the framework to extract rich COM type error information.
5151
52-
The general rule is that the **only** exception returned from Python COM
53-
Server code should be an COMException instance. Any other Python exception
54-
should be considered an implementation bug in the server (if not, it
55-
should be handled, and an appropriate COMException instance raised). Any
56-
other exception is considered "unexpected", and a dispatcher may take
52+
The general rule is that the **only** exception returned from Python COM
53+
Server code should be an COMException instance. Any other Python exception
54+
should be considered an implementation bug in the server (if not, it
55+
should be handled, and an appropriate COMException instance raised). Any
56+
other exception is considered "unexpected", and a dispatcher may take
5757
special action (see Dispatchers above)
5858
59-
Occasionally, the implementation will raise the policy.error error.
60-
This usually means there is a problem in the implementation that the
59+
Occasionally, the implementation will raise the policy.error error.
60+
This usually means there is a problem in the implementation that the
6161
Python programmer should fix.
6262
63-
For example, if policy is asked to wrap an object which it can not
64-
support (because, eg, it does not provide _public_methods_ or _dynamic_)
65-
then policy.error will be raised, indicating it is a Python programmers
63+
For example, if policy is asked to wrap an object which it can not
64+
support (because, eg, it does not provide _public_methods_ or _dynamic_)
65+
then policy.error will be raised, indicating it is a Python programmers
6666
problem, rather than a COM error.
67-
6867
"""
6968

7069
__author__ = "Greg Stein and Mark Hammond"

com/win32com/server/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
""" General Server side utilities
2-
"""
1+
""" General Server side utilities"""
32

43
import pythoncom
54
import winerror

com/win32com/test/testGIT.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Testing pasing object between multiple COM threads
22
3-
Uses standard COM marshalling to pass objects between threads. Even
3+
Uses standard COM marshalling to pass objects between threads. Even
44
though Python generally seems to work when you just pass COM objects
55
between threads, it shouldnt.
66
@@ -10,15 +10,14 @@
1010
COM marshalls back all calls to that object to the main Python thread,
1111
which must be running a message loop (as this sample does).
1212
13-
When this test is run in "free threaded" mode (at this stage, you must
14-
manually mark the COM objects as "ThreadingModel=Free", or run from a
13+
When this test is run in "free threaded" mode (at this stage, you must
14+
manually mark the COM objects as "ThreadingModel=Free", or run from a
1515
service which has marked itself as free-threaded), then no marshalling
1616
is done, and the Python.Interpreter object start doing the "expected" thing
1717
- ie, it reports being on the same thread as its caller!
1818
1919
Python.exe needs a good way to mark itself as FreeThreaded - at the moment
2020
this is a pain in the but!
21-
2221
"""
2322

2423
import _thread

com/win32comext/axscript/test/testHost.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def NotifyDoneIt(self, interface, arg):
9797
sub hello(arg1)
9898
test.echo arg1
9999
end sub
100-
100+
101101
sub testcollection
102102
if test.collection.Item(0) <> 1 then
103103
test.fail("Index 0 was wrong")
@@ -122,7 +122,7 @@ def NotifyDoneIt(self, interface, arg):
122122
prop = "Property Value"
123123
def hello(arg1):
124124
test.echo(arg1)
125-
125+
126126
def testcollection():
127127
# test.collection[1] = "New one"
128128
got = []

com/win32comext/shell/demos/explorer_browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from win32com.shell import shell, shellcon
1313

1414
# event handler for the browser.
15-
IExplorerBrowserEvents_Methods = """OnNavigationComplete OnNavigationFailed
15+
IExplorerBrowserEvents_Methods = """OnNavigationComplete OnNavigationFailed
1616
OnNavigationPending OnViewCreated""".split()
1717

1818

0 commit comments

Comments
 (0)