Skip to content

Commit d2edc18

Browse files
committed
backwards compatibility
1 parent 8fa70b8 commit d2edc18

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
* Changed `Tolerance` class to no longer use singleton pattern. `Tolerance()` now creates independent instances instead of returning the global `TOL`.
1818
* Renamed `Tolerance.units` to `Tolerance.unit` to better reflect the documented properties. Left `units` with deprecation warning.
19+
* Brought back `Tolerance.lineardflection` for backwards compatibility.
20+
* Brought back `Tolerance.angulardflection` for backwards compatibility.
1921

2022
### Removed
2123

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)