MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / __init__

Method __init__

scripts/add-spdx-attribution.py:31–37  ·  view source on GitHub ↗

Initialize the attributor with a repository root and options.

(self, repo_root: str, dry_run: bool = False)

Source from the content-addressed store, hash-verified

29 """Add SPDX attribution headers to source files based on git blame."""
30
31 def __init__(self, repo_root: str, dry_run: bool = False):
32 """Initialize the attributor with a repository root and options."""
33 self.repo_root = Path(repo_root).resolve()
34 self.dry_run = dry_run
35 self.exclude_patterns = self._load_exclude_patterns()
36 self.mailmap = self._parse_mailmap()
37 self.company_domains = self._build_company_domain_map()
38
39 def _load_exclude_patterns(self) -> List[str]:
40 """Load exclusion patterns from .spdx-exclude file."""

Callers

nothing calls this directly

Calls 4

_parse_mailmapMethod · 0.95
resolveMethod · 0.80

Tested by

no test coverage detected