| 32 | |
| 33 | @attr.s(frozen=True) |
| 34 | class ScriptMetadataApplication(object): |
| 35 | scripts = attr.ib() # type: Tuple[ScriptMetadata, ...] |
| 36 | requirement_configuration = attr.ib() # type: RequirementConfiguration |
| 37 | target_configuration = attr.ib() # type: TargetConfiguration |
| 38 | |
| 39 | def target_does_not_apply(self, target): |
| 40 | # type: (Target) -> Tuple[ScriptMetadata, ...] |
| 41 | return tuple( |
| 42 | script |
| 43 | for script in self.scripts |
| 44 | if not target.requires_python_applies( |
| 45 | requires_python=script.requires_python, source=script.source |
| 46 | ) |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | def apply_script_metadata( |
no outgoing calls