simulatino / trimtrailingwhitespaces

Python script that detects textfiles and then removes trailing white spaces and more.
The Unlicense
11 stars 2 forks source link

Remove default smooth modification from Line #25

Closed tbeu closed 10 years ago

tbeu commented 10 years ago

In same context as #12: smooth=Smooth.None can be deleted from Line. Dymola generates this always.

dietmarw commented 10 years ago

OK that was an easy one to add. I'll probably wait with a new release so just use the HEAD of master for now to get this functionality.

tbeu commented 10 years ago

Thanks. It should also be removed from Polygon. Sorry!

Will you run ttws on MBE again?

dietmarw commented 10 years ago

Should also be included really but I'll do a grep tomorrow to check and will run it on MBE

dietmarw commented 10 years ago

Oh it is actually removed everywhere. Would this be a problem in some cases?

tbeu commented 10 years ago

Do you mean smooth=Smooth.None is always removed, no matter what the annotation is? Currently there is no problem since smooth=Smooth.None is only available in Line and Polygon record. But it is not upward compatible to new annotation records in general.

tbeu commented 10 years ago

What I consider a problem is that it is removed anywhere in the Mo file not just in the annotation. Thus if I rebuild the Smooth type and use it in my Mo model it will be adapted.

Also

can be removed from Polygon, Rectangle, Ellipse and Text annotation.

dietmarw commented 10 years ago

So yes currently I remove the pattern globally. Which is not ideal and therefor I've opened up ticket #26 which hopefully lead to a more exact removal.

dietmarw commented 10 years ago

I've now reverted the removal of smooth=Smooth.None as doing this globally might actually cause more problems as it does good. I've also now released version 0.6.0 where I plan that the 0.6.x versions are going to be about bugfixes only and no more additional clean out features. Those should be rewritten as mentioned in #26 and might lead to a version 0.7.0 at some point.

tbeu commented 10 years ago

Is this consistent enough? Why only smooth=Smooth.None? Either all annotations that can lead to false positives should be removed or none? By the way, I never mind the false positives since I check the diff before commit.

Do you still want to remove smooth=Smooth.None from MbE? Plenty of hits.

dietmarw commented 10 years ago

Well there is a difference of removing annotations with just default values and meaningless annotations for some types. The smooth one is just meaningless for lines or rectangles but might have a meaning in others. That's why I think it's more dangerous to remove them than others globally. Feel free to simply install the version 6dea37b and use that one.