| 212 | |
| 213 | @attr.s() |
| 214 | class ScoringElements: |
| 215 | score = attr.ib(default=0) |
| 216 | declared_license = attr.ib(default=False) |
| 217 | identification_precision = attr.ib(default=False) |
| 218 | has_license_text = attr.ib(default=False) |
| 219 | declared_copyrights = attr.ib(default=False) |
| 220 | conflicting_license_categories = attr.ib(default=False) |
| 221 | ambiguous_compound_licensing = attr.ib(default=False) |
| 222 | |
| 223 | def to_dict(self): |
| 224 | return { |
| 225 | 'score': self.score, |
| 226 | 'declared_license': self.declared_license, |
| 227 | 'identification_precision': self.identification_precision, |
| 228 | 'has_license_text': self.has_license_text, |
| 229 | 'declared_copyrights': self.declared_copyrights, |
| 230 | 'conflicting_license_categories': self.conflicting_license_categories, |
| 231 | 'ambiguous_compound_licensing': self.ambiguous_compound_licensing, |
| 232 | } |
| 233 | |
| 234 | |
| 235 | # minimum score to consider a license detection as good. |
no outgoing calls
no test coverage detected