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

Class FileRegion

src/licensedcode/detection.py:150–161  ·  view source on GitHub ↗

A file has one or more file-regions, which are separate regions of the file containing some license information (separated by code/text/others in between), and identified by a start line and an end line.

Source from the content-addressed store, hash-verified

148
149@attr.s
150class FileRegion:
151 """
152 A file has one or more file-regions, which are separate regions of the file
153 containing some license information (separated by code/text/others in between),
154 and identified by a start line and an end line.
155 """
156 path = attr.ib(type=str)
157 start_line = attr.ib(type=int)
158 end_line = attr.ib(type=int)
159
160 def to_dict(self):
161 return attr.asdict(self, dict_factory=dict)
162
163
164@attr.s(slots=True, eq=False, order=False)

Callers 2

from_packageMethod · 0.90
get_file_regionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected