climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1521553 - /incubator/climate/trunk/ocw/metrics.py
Date Tue, 10 Sep 2013 17:07:52 GMT
Author: joyce
Date: Tue Sep 10 17:07:51 2013
New Revision: 1521553

URL: http://svn.apache.org/r1521553
Log:
CLIMATE-284 - Make Unary and Binary Metrics inherit from base Metric class for easy membership
testing.

Modified:
    incubator/climate/trunk/ocw/metrics.py

Modified: incubator/climate/trunk/ocw/metrics.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw/metrics.py?rev=1521553&r1=1521552&r2=1521553&view=diff
==============================================================================
--- incubator/climate/trunk/ocw/metrics.py (original)
+++ incubator/climate/trunk/ocw/metrics.py Tue Sep 10 17:07:51 2013
@@ -22,7 +22,12 @@ Classes:
 
 from abc import ABCMeta, abstractmethod
 
-class UnaryMetric():
+class Metric(object):
+    '''Base Metric Class'''
+    __metaclass__ = ABCMeta
+
+
+class UnaryMetric(Metric):
     '''Abstract Base Class from which all unary metrics inherit.'''
     __metaclass__ = ABCMeta
 
@@ -37,7 +42,7 @@ class UnaryMetric():
         '''
 
 
-class BinaryMetric():
+class BinaryMetric(Metric):
     '''Abstract Base Class from which all binary metrics inherit.'''
     __metaclass__ = ABCMeta
 



Mime
View raw message