File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515### Changed
1616
1717* Changed ` Tolerance ` class to no longer use singleton pattern. ` Tolerance() ` now creates independent instances instead of returning the global ` TOL ` .
18+ * Renamed ` Tolerance.units ` to ` Tolerance.unit ` to better reflect the documented properties. Left ` units ` with deprecation warning.
1819
1920### Removed
2021
Original file line number Diff line number Diff line change 3434
3535from contextlib import contextmanager
3636from decimal import Decimal
37+ from warnings import warn
3738
3839import compas
3940from compas .data import Data
@@ -443,6 +444,16 @@ def unit(self, value):
443444 raise ValueError ("Invalid unit: {}" .format (value ))
444445 self ._unit = value
445446
447+ @property
448+ def units (self ):
449+ warn ("The 'units' property is deprecated. Use 'unit' instead." , DeprecationWarning )
450+ return self .unit
451+
452+ @units .setter
453+ def units (self , value ):
454+ warn ("The 'units' property is deprecated. Use 'unit' instead." , DeprecationWarning )
455+ self .unit = value
456+
446457 @property
447458 def absolute (self ):
448459 if not self ._absolute :
You can’t perform that action at this time.
0 commit comments