jaymd96-pants-baseline 0.2.6__py3-none-any.whl → 0.2.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jaymd96_pants_baseline-0.2.6.dist-info → jaymd96_pants_baseline-0.2.8.dist-info}/METADATA +1 -1
- {jaymd96_pants_baseline-0.2.6.dist-info → jaymd96_pants_baseline-0.2.8.dist-info}/RECORD +7 -7
- pants_baseline/__about__.py +1 -1
- pants_baseline/rules/fmt_rules.py +13 -18
- pants_baseline/rules/lint_rules.py +13 -18
- {jaymd96_pants_baseline-0.2.6.dist-info → jaymd96_pants_baseline-0.2.8.dist-info}/WHEEL +0 -0
- {jaymd96_pants_baseline-0.2.6.dist-info → jaymd96_pants_baseline-0.2.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaymd96-pants-baseline
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Opinionated Python code quality baseline plugin for Pants build system
|
|
5
5
|
Project-URL: Homepage, https://github.com/jaymd96/pants-baseline
|
|
6
6
|
Project-URL: Repository, https://github.com/jaymd96/pants-baseline.git
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pants_baseline/__about__.py,sha256=
|
|
1
|
+
pants_baseline/__about__.py,sha256=rYvO_FgZBX0E61te4WmlaIkWMVFRmzs4_mVxriX6Ut8,98
|
|
2
2
|
pants_baseline/__init__.py,sha256=uVRGi1D2gFjc7emmeewWdcvpO-NsUuKsMbX3rztOxWU,655
|
|
3
3
|
pants_baseline/bundled_claude_plugins.py,sha256=rHchQRQ_UabOOKyQOxVwoyE2xLjE8eiUFVN7oERDCe0,1608
|
|
4
4
|
pants_baseline/register.py,sha256=_ahV7CRNWxv4lUXb03ZBM9vJnP4ekLw8DgnpInVK35o,1078
|
|
@@ -11,8 +11,8 @@ pants_baseline/goals/test.py,sha256=THW4kJAFbAzPCjLbq1dxg81T19QdywXYiwTNKSB4z8M,
|
|
|
11
11
|
pants_baseline/goals/typecheck.py,sha256=nqfwy1BZqhEzlDX-_hme9mKuDI2KqH-XpN4ygzWMQ6Y,2626
|
|
12
12
|
pants_baseline/rules/__init__.py,sha256=UpvDpGVImhRfp2_VeUNsRPGiWjBbMI6AV1-Yx3kS0Gg,252
|
|
13
13
|
pants_baseline/rules/audit_rules.py,sha256=5VzHExJdvB00KrVIAuxlb7pwNfTC0djr5QzF8wXMYws,2906
|
|
14
|
-
pants_baseline/rules/fmt_rules.py,sha256=
|
|
15
|
-
pants_baseline/rules/lint_rules.py,sha256=
|
|
14
|
+
pants_baseline/rules/fmt_rules.py,sha256=O8vVpfQMvgrITJEMXIldyBmMWEBP3VCXmkTJuMImqYg,3682
|
|
15
|
+
pants_baseline/rules/lint_rules.py,sha256=EdHmydXbAom2p3vPdq_JGS8ZrylQZ0UPtn-TWYOBoPI,4252
|
|
16
16
|
pants_baseline/rules/test_rules.py,sha256=Q_opWXkNS2IDSRQmDdYz-PETl9QEXgwaO_iPN4QWHjY,4268
|
|
17
17
|
pants_baseline/rules/typecheck_rules.py,sha256=5jr7S9IPzDQOdO5kwwpn3q6m45GKJVlEDO2FN8wN6Ac,4579
|
|
18
18
|
pants_baseline/subsystems/__init__.py,sha256=LteH_qmUIgRAnXYmmi7f6o894QfpY3hMNH5dlvJbSoM,387
|
|
@@ -20,7 +20,7 @@ pants_baseline/subsystems/baseline.py,sha256=CU8ZhNCJw8BSXSyuvZ1eH-Y2CSPggp2O-I2
|
|
|
20
20
|
pants_baseline/subsystems/ruff.py,sha256=47fQg4fM_qzLGfxb_WFLYT1URL_4VxkJWw7LBOEQyT0,4248
|
|
21
21
|
pants_baseline/subsystems/ty.py,sha256=F9F2YyYlbt1PlvsVP8qMAa_l0C-JezyjiDnBs4RMTIc,3722
|
|
22
22
|
pants_baseline/subsystems/uv.py,sha256=z8gflmuuF0mEN4Bhlp29w2BlrM0M-4cYv7Y0wKhjOnk,3369
|
|
23
|
-
jaymd96_pants_baseline-0.2.
|
|
24
|
-
jaymd96_pants_baseline-0.2.
|
|
25
|
-
jaymd96_pants_baseline-0.2.
|
|
26
|
-
jaymd96_pants_baseline-0.2.
|
|
23
|
+
jaymd96_pants_baseline-0.2.8.dist-info/METADATA,sha256=EoHbSJMNHtdFpzOilFP2Qkbq4uIoonk1ZUpBVGMl0UQ,8764
|
|
24
|
+
jaymd96_pants_baseline-0.2.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
25
|
+
jaymd96_pants_baseline-0.2.8.dist-info/licenses/LICENSE,sha256=oLGLZv7XKM_oKCbdMW1bZB37SXsdexmhNSuh3Xg4m4I,10754
|
|
26
|
+
jaymd96_pants_baseline-0.2.8.dist-info/RECORD,,
|
pants_baseline/__about__.py
CHANGED
|
@@ -15,24 +15,19 @@ from pants.engine.target import FieldSet, Target
|
|
|
15
15
|
from pants.util.logging import LogLevel
|
|
16
16
|
from pants.util.meta import classproperty
|
|
17
17
|
|
|
18
|
+
from pants.backend.python.target_types import PythonSourceField
|
|
19
|
+
|
|
18
20
|
from pants_baseline.subsystems.baseline import BaselineSubsystem
|
|
19
21
|
from pants_baseline.subsystems.ruff import RuffSubsystem
|
|
20
|
-
from pants_baseline.targets import BaselineSourcesField, SkipFormatField
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
@dataclass(frozen=True)
|
|
24
25
|
class RuffFmtFieldSet(FieldSet):
|
|
25
26
|
"""Field set for Ruff formatting."""
|
|
26
27
|
|
|
27
|
-
required_fields = (
|
|
28
|
-
|
|
29
|
-
sources: BaselineSourcesField
|
|
30
|
-
skip_fmt: SkipFormatField
|
|
28
|
+
required_fields = (PythonSourceField,)
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
def opt_out(cls, tgt: Target) -> bool:
|
|
34
|
-
"""Allow targets to opt out of formatting."""
|
|
35
|
-
return tgt.get(SkipFormatField).value
|
|
30
|
+
sources: PythonSourceField
|
|
36
31
|
|
|
37
32
|
|
|
38
33
|
class RuffFmtRequest(FmtTargetsRequest):
|
|
@@ -90,16 +85,16 @@ async def run_ruff_fmt(
|
|
|
90
85
|
*snapshot.files,
|
|
91
86
|
]
|
|
92
87
|
|
|
93
|
-
process: Process = Process(
|
|
94
|
-
argv=argv,
|
|
95
|
-
input_digest=input_digest,
|
|
96
|
-
output_files=snapshot.files,
|
|
97
|
-
description=f"Run Ruff format on {len(snapshot.files)} files",
|
|
98
|
-
level=LogLevel.DEBUG,
|
|
99
|
-
)
|
|
100
|
-
|
|
101
88
|
result: FallibleProcessResult = await execute_process_or_raise(
|
|
102
|
-
**implicitly(
|
|
89
|
+
**implicitly(
|
|
90
|
+
Process(
|
|
91
|
+
argv=argv,
|
|
92
|
+
input_digest=input_digest,
|
|
93
|
+
output_files=snapshot.files,
|
|
94
|
+
description=f"Run Ruff format on {len(snapshot.files)} files",
|
|
95
|
+
level=LogLevel.DEBUG,
|
|
96
|
+
)
|
|
97
|
+
)
|
|
103
98
|
)
|
|
104
99
|
output_snapshot: Snapshot = await digest_to_snapshot(result.output_digest)
|
|
105
100
|
|
|
@@ -16,24 +16,19 @@ from pants.engine.target import FieldSet, Target
|
|
|
16
16
|
from pants.util.logging import LogLevel
|
|
17
17
|
from pants.util.meta import classproperty
|
|
18
18
|
|
|
19
|
+
from pants.backend.python.target_types import PythonSourceField
|
|
20
|
+
|
|
19
21
|
from pants_baseline.subsystems.baseline import BaselineSubsystem
|
|
20
22
|
from pants_baseline.subsystems.ruff import RuffSubsystem
|
|
21
|
-
from pants_baseline.targets import BaselineSourcesField, SkipLintField
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
@dataclass(frozen=True)
|
|
25
26
|
class RuffLintFieldSet(FieldSet):
|
|
26
27
|
"""Field set for Ruff linting."""
|
|
27
28
|
|
|
28
|
-
required_fields = (
|
|
29
|
-
|
|
30
|
-
sources: BaselineSourcesField
|
|
31
|
-
skip_lint: SkipLintField
|
|
29
|
+
required_fields = (PythonSourceField,)
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
def opt_out(cls, tgt: Target) -> bool:
|
|
35
|
-
"""Allow targets to opt out of linting."""
|
|
36
|
-
return tgt.get(SkipLintField).value
|
|
31
|
+
sources: PythonSourceField
|
|
37
32
|
|
|
38
33
|
|
|
39
34
|
class RuffLintRequest(LintTargetsRequest):
|
|
@@ -78,7 +73,7 @@ async def run_ruff_lint(
|
|
|
78
73
|
sources: SourceFiles = await determine_source_files(
|
|
79
74
|
SourceFilesRequest(
|
|
80
75
|
sources_fields=[fs.sources for fs in field_sets],
|
|
81
|
-
for_sources_types=(
|
|
76
|
+
for_sources_types=(PythonSourceField,),
|
|
82
77
|
)
|
|
83
78
|
)
|
|
84
79
|
|
|
@@ -105,15 +100,15 @@ async def run_ruff_lint(
|
|
|
105
100
|
*sources.files,
|
|
106
101
|
]
|
|
107
102
|
|
|
108
|
-
process: Process = Process(
|
|
109
|
-
argv=argv,
|
|
110
|
-
input_digest=input_digest,
|
|
111
|
-
description=f"Run Ruff lint on {len(sources.files)} files",
|
|
112
|
-
level=LogLevel.DEBUG,
|
|
113
|
-
)
|
|
114
|
-
|
|
115
103
|
result: FallibleProcessResult = await execute_process_or_raise(
|
|
116
|
-
**implicitly(
|
|
104
|
+
**implicitly(
|
|
105
|
+
Process(
|
|
106
|
+
argv=argv,
|
|
107
|
+
input_digest=input_digest,
|
|
108
|
+
description=f"Run Ruff lint on {len(sources.files)} files",
|
|
109
|
+
level=LogLevel.DEBUG,
|
|
110
|
+
)
|
|
111
|
+
)
|
|
117
112
|
)
|
|
118
113
|
|
|
119
114
|
return LintResult.create(
|
|
File without changes
|
{jaymd96_pants_baseline-0.2.6.dist-info → jaymd96_pants_baseline-0.2.8.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|