Skip to content

Commit 469f943

Browse files
authored
No unnecessary len or dict comprehension (#2554)
1 parent 38d2b77 commit 469f943

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

AutoDuck/py2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def BuildArgInfos(ob):
2424
info = DocInfo(n, ob)
2525
info.short_desc = info.desc = n
2626
info.default = ""
27-
if len(defs):
27+
if defs:
2828
default = repr(defs.pop())
2929
# the default may be an object, so the repr gives '<...>' - and
3030
# the angle brackets screw autoduck.

com/win32com/makegw/makegwparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def _GetPythonTypeDesc(self):
772772
"PCUITEMID_CHILD_ARRAY": (ArgFormatterIDLIST, 2),
773773
"const PCUITEMID_CHILD_ARRAY": (ArgFormatterIDLIST, 2),
774774
# Auto-add all the simple types
775-
**{key: (ArgFormatterSimple, 0) for key in ConvertSimpleTypes},
775+
**dict.fromkeys(ConvertSimpleTypes, (ArgFormatterSimple, 0)),
776776
}
777777

778778

win32/scripts/regsetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def RegisterShellInfo(searchPaths):
589589
print("Registering application", a, "to path", path)
590590
regutil.RegisterNamedPath(a, path)
591591
if o == "-c":
592-
if not len(searchPaths):
592+
if not searchPaths:
593593
raise error("-c option must provide at least one additional path")
594594
import regutil
595595

0 commit comments

Comments
 (0)