From 96406ff97c09bd1d5acef9dcc9a7f5a92c9a13bf Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 1 Mar 2021 10:35:39 -0600 Subject: [PATCH] [Arch] LGTM issues in Dice3DS LGTM identified a few minor issues in the Dice3DS code -- none of them appear to be real errors, so the changes here should not affect the behavior of the code. --- src/Mod/Arch/Dice3DS/dom3ds.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Mod/Arch/Dice3DS/dom3ds.py b/src/Mod/Arch/Dice3DS/dom3ds.py index 3d688ce162..8cf31cec75 100644 --- a/src/Mod/Arch/Dice3DS/dom3ds.py +++ b/src/Mod/Arch/Dice3DS/dom3ds.py @@ -16,7 +16,7 @@ data of the second object like this: """ -import os, sys, struct +import sys, struct import numpy @@ -550,7 +550,7 @@ class UnknownChunk(UndefinedChunk): __slots__ = ['tag'] label = "UNKNOWN" def __init__(self,tag): - self.tag = tag + super().__init__(tag=tag) class ErrorChunk(UndefinedChunk): @@ -558,9 +558,7 @@ class ErrorChunk(UndefinedChunk): label = "ERROR" tag = 0xEEEE def __init__(self,intended_tag=None,intended_label=None,error_msg=None): - self.intended_tag = intended_tag - self.intended_label = intended_label - self.error_msg = error_msg + super().__init__(intended_tag=intended_tag,intended_label=intended_label,error_msg=error_msg) def dump(self,flo,indent,flags): super(ErrorChunk,self).dump(flo,indent,flags) if self.intended_tag is not None: @@ -695,7 +693,6 @@ class TrackChunk(ChunkBase): n = self.nkeys else: n = min(flags['arraylines'],self.nkeys) - indent2 = indent+" " for i in xrange(n): kf = self.keys[i] flo.write("%skeys[0] = %s.Key\n" % (indent,self.label))