• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 21552830208

31 Jan 2026 11:40PM UTC coverage: 80.277% (-0.05%) from 80.324%
21552830208

Pull #23062

github

web-flow
Merge 808a9786c into 2c4dcf9cf
Pull Request #23062: Remove support for Get

18 of 25 new or added lines in 4 files covered. (72.0%)

17119 existing lines in 541 files now uncovered.

78278 of 97510 relevant lines covered (80.28%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/python/pants/backend/swift/target_types.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
1✔
5

UNCOV
6
from pants.engine.target import (
1✔
7
    COMMON_TARGET_FIELDS,
8
    Dependencies,
9
    MultipleSourcesField,
10
    SingleSourceField,
11
    Target,
12
    TargetFilesGenerator,
13
    generate_multiple_sources_field_help_message,
14
)
15

UNCOV
16
SWIFT_FILE_EXTENSIONS = (".swift",)
1✔
17

18

UNCOV
19
class SwiftDependenciesField(Dependencies):
1✔
UNCOV
20
    pass
1✔
21

22

UNCOV
23
class SwiftSourceField(SingleSourceField):
1✔
UNCOV
24
    expected_file_extensions = SWIFT_FILE_EXTENSIONS
1✔
25

26

UNCOV
27
class SwiftGeneratorSourcesField(MultipleSourcesField):
1✔
UNCOV
28
    expected_file_extensions = SWIFT_FILE_EXTENSIONS
1✔
29

30

31
# -----------------------------------------------------------------------------------------------
32
# `swift_source` and `swift_sources` targets
33
# -----------------------------------------------------------------------------------------------
34

35

UNCOV
36
class SwiftSourceTarget(Target):
1✔
UNCOV
37
    alias = "swift_source"
1✔
UNCOV
38
    core_fields = (
1✔
39
        *COMMON_TARGET_FIELDS,
40
        SwiftDependenciesField,
41
        SwiftSourceField,
42
    )
UNCOV
43
    help = "A single Swift source file."
1✔
44

45

UNCOV
46
class SwiftSourcesGeneratorSourcesField(SwiftGeneratorSourcesField):
1✔
UNCOV
47
    default = tuple(f"*{ext}" for ext in SWIFT_FILE_EXTENSIONS)
1✔
UNCOV
48
    help = generate_multiple_sources_field_help_message(
1✔
49
        "Example: `sources=['utils.swift', 'subdir/*.swift', '!ignore_me.swift']`"
50
    )
51

52

UNCOV
53
class SwiftSourcesGeneratorTarget(TargetFilesGenerator):
1✔
UNCOV
54
    alias = "swift_sources"
1✔
UNCOV
55
    core_fields = (
1✔
56
        *COMMON_TARGET_FIELDS,
57
        SwiftSourcesGeneratorSourcesField,
58
    )
UNCOV
59
    generated_target_cls = SwiftSourceTarget
1✔
UNCOV
60
    copied_fields = COMMON_TARGET_FIELDS
1✔
UNCOV
61
    moved_fields = (SwiftDependenciesField,)
1✔
UNCOV
62
    help = "Generate a `swift_source` target for each file in the `sources` field."
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc