Draft: Avoid dictionary.keys() where possible (#10160)

This commit is contained in:
Roy-043
2023-08-13 11:46:25 +02:00
committed by GitHub
parent 0b58b7ba5a
commit beb996e6a1
6 changed files with 14 additions and 13 deletions

View File

@@ -71,7 +71,7 @@ def move(objectslist, vector, copy=False):
doc = App.ActiveDocument
for obj in objectslist:
if obj.isDerivedFrom("App::DocumentObjectGroup") \
and obj.Name not in newgroups.keys():
and obj.Name not in newgroups:
newgroups[obj.Name] = doc.addObject(obj.TypeId,
utils.get_real_name(obj.Name))

View File

@@ -80,7 +80,7 @@ def rotate(objectslist, angle, center=App.Vector(0, 0, 0),
doc = App.ActiveDocument
for obj in objectslist:
if obj.isDerivedFrom("App::DocumentObjectGroup") \
and obj.Name not in newgroups.keys():
and obj.Name not in newgroups:
newgroups[obj.Name] = doc.addObject(obj.TypeId,
utils.get_real_name(obj.Name))