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

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

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

0.0
/src/python/pants/backend/helm/check/kubeconform/extra_fields.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from abc import ABCMeta
×
UNCOV
7
from dataclasses import dataclass
×
8

UNCOV
9
from pants.backend.helm.target_types import HelmChartTarget, HelmDeploymentTarget
×
UNCOV
10
from pants.engine.target import (
×
11
    BoolField,
12
    Field,
13
    FieldSet,
14
    StringField,
15
    StringSequenceField,
16
    Target,
17
    TriBoolField,
18
)
UNCOV
19
from pants.util.docutil import bin_name
×
UNCOV
20
from pants.util.strutil import help_text
×
21

22

UNCOV
23
class KubeconformSkipField(BoolField):
×
UNCOV
24
    alias = "skip_kubeconform"
×
UNCOV
25
    default = False
×
UNCOV
26
    help = help_text(
×
27
        f"""
28
        If set to true, do not run any kubeconform checking in this Helm target when running
29
        `{bin_name()} check`.
30
        """
31
    )
32

33

UNCOV
34
class KubeconformIgnoreSourcesField(StringSequenceField):
×
UNCOV
35
    alias = "kubeconform_ignore_sources"
×
UNCOV
36
    help = help_text("""Regular expression patterns specifying paths to ignore.""")
×
37

38

UNCOV
39
class KubeconformIgnoreMissingSchemasField(TriBoolField):
×
UNCOV
40
    alias = "kubeconform_ignore_missing_schemas"
×
UNCOV
41
    help = help_text("""Whether to fail if there are missing schemas for custom resources.""")
×
42

43

UNCOV
44
class KubeconformStrictField(TriBoolField):
×
UNCOV
45
    alias = "kubeconform_strict"
×
UNCOV
46
    help = help_text("Run Kubeconform in strict mode.")
×
47

48

UNCOV
49
class KubeconformSkipKindsField(StringSequenceField):
×
UNCOV
50
    alias = "kubeconform_skip_kinds"
×
UNCOV
51
    help = help_text("List of kinds or GVKs to ignore.")
×
52

53

UNCOV
54
class KubeconformRejectKindsField(StringSequenceField):
×
UNCOV
55
    alias = "kubeconform_reject_kinds"
×
UNCOV
56
    help = help_text("List of kinds or GVKs to reject.")
×
57

58

UNCOV
59
class KubeconformKubernetesVersionField(StringField):
×
UNCOV
60
    alias = "kubeconform_kubernetes_version"
×
UNCOV
61
    help = help_text("Kubernetes version to use for the validation.")
×
62

63

UNCOV
64
@dataclass(frozen=True)
×
UNCOV
65
class KubeconformFieldSet(FieldSet, metaclass=ABCMeta):
×
UNCOV
66
    skip: KubeconformSkipField
×
UNCOV
67
    ignore_sources: KubeconformIgnoreSourcesField
×
UNCOV
68
    ignore_missing_schemas: KubeconformIgnoreMissingSchemasField
×
UNCOV
69
    strict: KubeconformStrictField
×
UNCOV
70
    reject_kinds: KubeconformRejectKindsField
×
UNCOV
71
    skip_kinds: KubeconformSkipKindsField
×
UNCOV
72
    kubernetes_version: KubeconformKubernetesVersionField
×
73

UNCOV
74
    @classmethod
×
UNCOV
75
    def opt_out(cls, target: Target) -> bool:
×
76
        return target[KubeconformSkipField].value
×
77

78

UNCOV
79
_HELM_TARGET_TYPES: list[type[Target]] = [HelmChartTarget, HelmDeploymentTarget]
×
UNCOV
80
_KUBECONFORM_COMMON_FIELD_TYPES: list[type[Field]] = [
×
81
    KubeconformSkipField,
82
    KubeconformIgnoreSourcesField,
83
    KubeconformIgnoreMissingSchemasField,
84
    KubeconformSkipKindsField,
85
    KubeconformRejectKindsField,
86
    KubeconformStrictField,
87
    KubeconformKubernetesVersionField,
88
]
89

90

UNCOV
91
def rules():
×
UNCOV
92
    return [
×
93
        tgt.register_plugin_field(field)
94
        for tgt in _HELM_TARGET_TYPES
95
        for field in _KUBECONFORM_COMMON_FIELD_TYPES
96
    ]
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