-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
We could replace % string formatting with f-strings wherever applicable, as was done in #654.
For details on f-string syntax, refer to the Python official documentation.
-
Most of the changes should follow these patterns:
- Replace
"...%s..." % foowithf"...{foo}..." - Replace
"...%r..." % foowithf"...{foo!r}..." - Replace
"...%x..." % foowithf"...{foo:x}..." - Replace
"...%d..." % foowithf"...{foo:d}..." - Replace
"...\\%s..." % foowithf"...\\{foo}..." - Replace
r"...\%s..." % foowithrf"...\{foo}..."
- Replace
-
There’s NO need to modify placeholders in logger method calls, as shown below.
Lines 137 to 141 in 083c19e
def CoInitializeEx(flags=None): if flags is None: flags = getattr(sys, "coinit_flags", COINIT_APARTMENTTHREADED) logger.debug("CoInitializeEx(None, %s)", flags) _ole32.CoInitializeEx(None, flags) -
We welcome keeping changes as small as possible per pull request, as it makes it easier for reviewers to check the changes.
-
If your PR addresses multiple rules or files, reviewers might consider it a large change and suggest splitting it into multiple PRs.
TODO list
Under the comtypes/...
-
comtypes/_comobject.py -
comtypes/_memberspec.py -
comtypes/_post_coinit/_cominterface_meta_patcher.py -
comtypes/automation.py -
comtypes/client/_code_cache.py -
comtypes/client/_constants.py -
comtypes/client/_events.py -
comtypes/client/_generate.py -
comtypes/client/lazybind.py -
comtypes/errorinfo.py -
comtypes/server/inprocserver.py -
comtypes/server/register.py -
comtypes/server/w_getopt.py -
comtypes/tools/codegenerator/codegenerator.py -
comtypes/tools/codegenerator/helpers.py -
comtypes/tools/codegenerator/packing.py -
comtypes/tools/tlbparser.py -
comtypes/tools/typedesc.py -
comtypes/typeinfo.py -
comtypes/viewobject.py
Under the comtypes/test/...
-
comtypes/test/__init__.py -
comtypes/test/test_BSTR.py -
comtypes/test/test_avmc.py -
comtypes/test/test_casesensitivity.py -
comtypes/test/test_collections.py -
comtypes/test/test_comserver.py -
comtypes/test/test_createwrappers.py -
comtypes/test/test_dispinterface.py -
comtypes/test/test_excel.py -
comtypes/test/test_outparam.py -
comtypes/test/test_safearray.py -
comtypes/test/test_sapi.py -
comtypes/test/test_server.py -
comtypes/test/test_urlhistory.py -
comtypes/test/test_variant.py -
comtypes/test/test_word.py
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers