RadonMetrics/MaintainabilityIndexCalculator.py

branch
eric7
changeset 104
6eac83394939
parent 94
725eaca7bc4b
child 106
6422943b388f
equal deleted inserted replaced
103:3fcdd23d144d 104:6eac83394939
5 5
6 """ 6 """
7 Module implementing the maintainability index service. 7 Module implementing the maintainability index service.
8 """ 8 """
9 9
10 import multiprocessing
10 import queue 11 import queue
11 import multiprocessing
12 12
13 13
14 def initService(): 14 def initService():
15 """ 15 """
16 Initialize the service and return the entry point. 16 Initialize the service and return the entry point.
147 @param text source text 147 @param text source text
148 @type str 148 @type str
149 @return tuple containing the result dictionary 149 @return tuple containing the result dictionary
150 @rtype (tuple of dict) 150 @rtype (tuple of dict)
151 """ 151 """
152 from radon.metrics import mi_visit, mi_rank 152 from radon.metrics import mi_rank, mi_visit
153 153
154 try: 154 try:
155 mi = mi_visit(text, True) 155 mi = mi_visit(text, True)
156 rank = mi_rank(mi) 156 rank = mi_rank(mi)
157 res = {"mi": mi, "rank": rank} 157 res = {"mi": mi, "rank": rank}

eric ide

mercurial