MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / to_reference

Method to_reference

src/licensedcode/models.py:2113–2145  ·  view source on GitHub ↗

Return a mapping of reference data for this Rule object.

(self)

Source from the content-addressed store, hash-verified

2111 return mapping
2112
2113 def to_reference(self):
2114 """
2115 Return a mapping of reference data for this Rule object.
2116 """
2117 data = {}
2118 data['license_expression'] = self.license_expression
2119 data['identifier'] = self.identifier
2120 data['language'] = self.language
2121 data['rule_url'] = self.rule_url
2122 data['is_license_text'] = self.is_license_text
2123 data['is_license_notice'] = self.is_license_notice
2124 data['is_license_reference'] = self.is_license_reference
2125 data['is_license_tag'] = self.is_license_tag
2126 data['is_license_intro'] = self.is_license_intro
2127 data['is_license_clue'] = self.is_license_clue
2128 data['is_required_phrase'] = self.is_required_phrase
2129 data['skip_for_required_phrase_generation'] = self.skip_for_required_phrase_generation
2130 data['is_continuous'] = self.is_continuous
2131 data['is_builtin'] = self.is_builtin
2132 data['is_from_license'] = self.is_from_license
2133 data['is_synthetic'] = self.is_synthetic
2134 data['length'] = self.length
2135 data['relevance'] = as_int(self.relevance)
2136 data['minimum_coverage'] = as_int(self.minimum_coverage)
2137 data['referenced_filenames'] = self.referenced_filenames
2138 data['notes'] = self.notes
2139 data['ignorable_copyrights'] = self.ignorable_copyrights
2140 data['ignorable_holders'] = self.ignorable_holders
2141 data['ignorable_authors'] = self.ignorable_authors
2142 data['ignorable_urls'] = self.ignorable_urls
2143 data['ignorable_emails'] = self.ignorable_emails
2144 data['text'] = self.text
2145 return data
2146
2147 def to_dict(self, include_text=False):
2148 """

Callers

nothing calls this directly

Calls 1

as_intFunction · 0.85

Tested by

no test coverage detected