Changeset 56
- Timestamp:
- 12/19/10 00:40:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodebattler/trunk/pycodebattler/score.py
r55 r56 148 148 return int(score) or 1 149 149 150 def colon_score(self, coefficient= 2):150 def colon_score(self, coefficient=1.5): 151 151 colon_bytes = self.token_bytes([token.COLON]) or 1 152 score = self.uncommented_bytes() 153 score /= (score / colon_bytes) or 1 152 score = self.uncommented_bytes() / colon_bytes 154 153 score *= coefficient 155 154 score *= self.compressibility() 156 155 return int(score) or 1 157 156 158 def name_score(self, coefficient= 36):157 def name_score(self, coefficient=48): 159 158 name_bytes = self.token_bytes([token.NAME]) or 1 160 159 score = self.uncommented_bytes()
Note: See TracChangeset
for help on using the changeset viewer.