Skip to content

Commit 13febbe

Browse files
committed
added backwards compatibility with user warning for properties with typos
1 parent 4290170 commit 13febbe

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/compas/tolerance.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,26 @@ def angulardeflection(self):
526526
def angulardeflection(self, value):
527527
self._angulardeflection = value
528528

529+
@property
530+
def lineardflection(self):
531+
warn("The 'lineardflection' property is deprecated. Use 'lineardeflection' instead.", DeprecationWarning)
532+
return self.lineardeflection
533+
534+
@lineardflection.setter
535+
def lineardflection(self, value):
536+
warn("The 'lineardflection' property is deprecated. Use 'lineardeflection' instead.", DeprecationWarning)
537+
self.lineardeflection = value
538+
539+
@property
540+
def angulardflection(self):
541+
warn("The 'angulardflection' property is deprecated. Use 'angulardeflection' instead.", DeprecationWarning)
542+
return self.angulardeflection
543+
544+
@angulardflection.setter
545+
def angulardflection(self, value):
546+
warn("The 'angulardflection' property is deprecated. Use 'angulardeflection' instead.", DeprecationWarning)
547+
self.angulardeflection = value
548+
529549
def tolerance(self, truevalue, rtol, atol):
530550
"""Compute the tolerance for a comparison.
531551

0 commit comments

Comments
 (0)