Get the entry source file specified in the build spec. Returns ------- Optional[SourceFile] The SourceFile object containing the entry point, or None if not found.
(self)
| 310 | return self.spec.entry_point.split("::")[-1] |
| 311 | |
| 312 | def get_entry_source(self) -> Optional[SourceFile]: |
| 313 | """Get the entry source file specified in the build spec. |
| 314 | |
| 315 | Returns |
| 316 | ------- |
| 317 | Optional[SourceFile] |
| 318 | The SourceFile object containing the entry point, or None if not found. |
| 319 | """ |
| 320 | entry_path = self.spec.entry_point.split("::")[0] |
| 321 | for source in self.sources: |
| 322 | if source.path == entry_path: |
| 323 | return source |
| 324 | return None |
| 325 | |
| 326 | def model_post_init(self, __context: Any) -> None: |
| 327 | # Precompute hash once since the model is frozen/immutable. |
nothing calls this directly
no outgoing calls
no test coverage detected