diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Components.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Components.py index aa77cac500..9556eec6e3 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Components.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Components.py @@ -6,7 +6,6 @@ import adsk.core import adsk.fusion - from proto.proto_out import assembly_pb2, joint_pb2, material_pb2, types_pb2 from ...Logging import logFailure, timed diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/JointHierarchy.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/JointHierarchy.py index 53dd3d10fa..c5707ee63c 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/JointHierarchy.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/JointHierarchy.py @@ -5,7 +5,6 @@ import adsk.core import adsk.fusion - from proto.proto_out import joint_pb2, types_pb2 from ...general_imports import * diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Joints.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Joints.py index c79a0240d0..981b73fc73 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Joints.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Joints.py @@ -28,7 +28,6 @@ import adsk.core import adsk.fusion - from proto.proto_out import assembly_pb2, joint_pb2, motor_pb2, signal_pb2, types_pb2 from ...general_imports import * diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Materials.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Materials.py index 97d8d47f57..f1dc1e3b38 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Materials.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Materials.py @@ -5,7 +5,6 @@ import traceback import adsk - from proto.proto_out import material_pb2 from ...general_imports import * diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Parser.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Parser.py index fe034d20b4..6db886f7b5 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Parser.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/Parser.py @@ -4,7 +4,6 @@ import adsk.core import adsk.fusion from google.protobuf.json_format import MessageToJson - from proto.proto_out import assembly_pb2, types_pb2 from ...APS.APS import getAuth, upload_mirabuf diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/PhysicalProperties.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/PhysicalProperties.py index db488c115a..1aa91c7569 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/PhysicalProperties.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/PhysicalProperties.py @@ -21,7 +21,6 @@ from typing import Union import adsk - from proto.proto_out import types_pb2 from ...general_imports import INTERNAL_ID diff --git a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/RigidGroup.py b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/RigidGroup.py index 362a2a6e72..2172c08fc0 100644 --- a/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/RigidGroup.py +++ b/exporter/SynthesisFusionAddin/src/Parser/SynthesisParser/RigidGroup.py @@ -16,7 +16,6 @@ import adsk.core import adsk.fusion - from proto.proto_out import assembly_pb2 from ...Logging import logFailure diff --git a/exporter/SynthesisFusionAddin/tools/verifyIsortFormatting.py b/exporter/SynthesisFusionAddin/tools/verifyIsortFormatting.py index 0f9d899d5a..61772e05cb 100644 --- a/exporter/SynthesisFusionAddin/tools/verifyIsortFormatting.py +++ b/exporter/SynthesisFusionAddin/tools/verifyIsortFormatting.py @@ -18,9 +18,16 @@ def main() -> None: exitCode = 0 for i, (oldFileState, newFileState) in enumerate(zip(oldFileStates, newFileStates)): for j, (previousLine, newLine) in enumerate(zip(oldFileState, newFileState)): - if previousLine != newLine: - print(f"File {files[i]} is not formatted correctly!\nLine: {j + 1}") - exitCode = 1 + if previousLine == newLine: + continue + + print(f"File {files[i]} is not formatted correctly!\nLine: {j + 1}") + oldFileStateRange = range(max(0, j - 10), min(len(oldFileState), j + 11)) + print("\nOld file state:\n" + "\n".join(oldFileState[k].strip() for k in oldFileStateRange)) + newFileStateRange = range(max(0, j - 10), min(len(newFileState), j + 11)) + print("\nNew file state:\n" + "\n".join(newFileState[k].strip() for k in newFileStateRange)) + exitCode = 1 + break if not exitCode: print("All files are formatted correctly with isort!")