jaymd96-pants-baseline 0.1.2__py3-none-any.whl → 0.1.7__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.1.2.dist-info → jaymd96_pants_baseline-0.1.7.dist-info}/METADATA +1 -1
- jaymd96_pants_baseline-0.1.7.dist-info/RECORD +25 -0
- pants_baseline/__about__.py +1 -1
- pants_baseline/goals/audit.py +3 -4
- pants_baseline/goals/fmt.py +1 -0
- pants_baseline/goals/lint.py +1 -0
- pants_baseline/goals/test.py +1 -0
- pants_baseline/goals/typecheck.py +1 -0
- pants_baseline/register.py +0 -4
- pants_baseline/rules/audit_rules.py +2 -4
- pants_baseline/rules/fmt_rules.py +6 -7
- pants_baseline/rules/lint_rules.py +4 -6
- pants_baseline/rules/test_rules.py +6 -8
- pants_baseline/rules/typecheck_rules.py +4 -6
- jaymd96_pants_baseline-0.1.2.dist-info/RECORD +0 -25
- {jaymd96_pants_baseline-0.1.2.dist-info → jaymd96_pants_baseline-0.1.7.dist-info}/WHEEL +0 -0
- {jaymd96_pants_baseline-0.1.2.dist-info → jaymd96_pants_baseline-0.1.7.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.1.
|
|
3
|
+
Version: 0.1.7
|
|
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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
pants_baseline/__about__.py,sha256=T4K8CIb9JqzctGI3L4wC9eqzNvM2MGkrz714dtsWrmA,98
|
|
2
|
+
pants_baseline/__init__.py,sha256=uVRGi1D2gFjc7emmeewWdcvpO-NsUuKsMbX3rztOxWU,655
|
|
3
|
+
pants_baseline/register.py,sha256=MGOvpu2gCbv9sa-aYnsb-fsGilKi2I1yVpNARWFggCM,1528
|
|
4
|
+
pants_baseline/targets.py,sha256=G8ejj3QYaGHtLHbxirTyTjnEAWYxlpHFHYKV-_B4lMo,3300
|
|
5
|
+
pants_baseline/goals/__init__.py,sha256=pf6KU2CIQuDkx8ER3IS0H-kuNbBtX-AH5B5SnSP9_yw,192
|
|
6
|
+
pants_baseline/goals/audit.py,sha256=i7zyyKssWw6EE2zN5putWP9sikkcjUKn7g3Jrapv994,2380
|
|
7
|
+
pants_baseline/goals/fmt.py,sha256=etZHJRrST904L7ljU0r2xRlUbFA42gvhxmvLhxdZ5oA,1794
|
|
8
|
+
pants_baseline/goals/lint.py,sha256=_o_7Bt-w6mHslN7xwvu51NrM_mlh6TJLxe7JizA7Tfk,1930
|
|
9
|
+
pants_baseline/goals/test.py,sha256=THW4kJAFbAzPCjLbq1dxg81T19QdywXYiwTNKSB4z8M,1653
|
|
10
|
+
pants_baseline/goals/typecheck.py,sha256=AOFhJchdGgc6mm_4u5kGTqr2gTVVH6j7ZPRQ7oI1R0c,1769
|
|
11
|
+
pants_baseline/rules/__init__.py,sha256=UpvDpGVImhRfp2_VeUNsRPGiWjBbMI6AV1-Yx3kS0Gg,252
|
|
12
|
+
pants_baseline/rules/audit_rules.py,sha256=0HbFdo89CwiVBKvkABDpFJ8bOKnQhV1-guT_pFdwAnQ,1889
|
|
13
|
+
pants_baseline/rules/fmt_rules.py,sha256=BXw6ckUPFaBM2WFWWA8JjDa6CFdenNulNAUWjwsfJV0,3563
|
|
14
|
+
pants_baseline/rules/lint_rules.py,sha256=JCrjGMgv3buUyN5mK9_vlo-StjJjnKkOIv_5Zipy2Bs,3851
|
|
15
|
+
pants_baseline/rules/test_rules.py,sha256=jj4lk3-mueOPujPFPK2TCdBFZZA_vovdDdHED9jGp7U,4225
|
|
16
|
+
pants_baseline/rules/typecheck_rules.py,sha256=oDc-WcNdrv0zYHE6wj65la8YAjJkoDMWCox3SW1pIxc,3995
|
|
17
|
+
pants_baseline/subsystems/__init__.py,sha256=LteH_qmUIgRAnXYmmi7f6o894QfpY3hMNH5dlvJbSoM,387
|
|
18
|
+
pants_baseline/subsystems/baseline.py,sha256=M20muLytoWZnA4ZY3lkbSsdCXt6OMPH6IMJfXULAQSo,2049
|
|
19
|
+
pants_baseline/subsystems/ruff.py,sha256=v0yHmbdgsPMMgjxJrs-YaKPE_n7rE6h-D0HGhXheyyE,2601
|
|
20
|
+
pants_baseline/subsystems/ty.py,sha256=6M205VZD5TpX6T4vWZ4UFs5Y3T2rGqYtzidmiRh_6kg,2126
|
|
21
|
+
pants_baseline/subsystems/uv.py,sha256=K6G8KR3l-Jo18aMh183gfhEelJR57cb20yIqKUMw3K0,1851
|
|
22
|
+
jaymd96_pants_baseline-0.1.7.dist-info/METADATA,sha256=0wuOSC3UtXOlLTwioj7jphpF3y0awgduawPCo0vF_-c,7934
|
|
23
|
+
jaymd96_pants_baseline-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
+
jaymd96_pants_baseline-0.1.7.dist-info/licenses/LICENSE,sha256=oLGLZv7XKM_oKCbdMW1bZB37SXsdexmhNSuh3Xg4m4I,10754
|
|
25
|
+
jaymd96_pants_baseline-0.1.7.dist-info/RECORD,,
|
pants_baseline/__about__.py
CHANGED
pants_baseline/goals/audit.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Audit goal for uv security scanning."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from typing import Iterable
|
|
6
4
|
|
|
7
5
|
from pants.engine.console import Console
|
|
@@ -25,6 +23,7 @@ class BaselineAudit(Goal):
|
|
|
25
23
|
"""Goal to run uv security audit."""
|
|
26
24
|
|
|
27
25
|
subsystem_cls = BaselineAuditSubsystem
|
|
26
|
+
environment_behavior = Goal.EnvironmentBehavior.LOCAL_ONLY
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
@goal_rule
|
|
@@ -49,12 +48,12 @@ async def run_baseline_audit(
|
|
|
49
48
|
console.print_stdout(f" Ignoring: {', '.join(uv_subsystem.audit_ignore_vulns)}")
|
|
50
49
|
console.print_stdout("")
|
|
51
50
|
|
|
52
|
-
audit_request = UvAuditRequest(
|
|
51
|
+
audit_request: UvAuditRequest = UvAuditRequest(
|
|
53
52
|
lock_file=uv_subsystem.lock_file,
|
|
54
53
|
ignore_vulns=tuple(uv_subsystem.audit_ignore_vulns),
|
|
55
54
|
output_format=uv_subsystem.output_format,
|
|
56
55
|
)
|
|
57
|
-
result = await Get(AuditResult,
|
|
56
|
+
result = await Get(AuditResult, UvAuditRequest, audit_request)
|
|
58
57
|
|
|
59
58
|
if result.stdout:
|
|
60
59
|
console.print_stdout(result.stdout)
|
pants_baseline/goals/fmt.py
CHANGED
pants_baseline/goals/lint.py
CHANGED
pants_baseline/goals/test.py
CHANGED
pants_baseline/register.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Rules for uv security auditing."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from dataclasses import dataclass
|
|
6
4
|
from typing import Iterable
|
|
7
5
|
|
|
@@ -46,13 +44,13 @@ async def run_uv_audit(
|
|
|
46
44
|
*ignore_args,
|
|
47
45
|
]
|
|
48
46
|
|
|
49
|
-
process = Process(
|
|
47
|
+
process: Process = Process(
|
|
50
48
|
argv=argv,
|
|
51
49
|
description="Run uv security audit",
|
|
52
50
|
level=LogLevel.DEBUG,
|
|
53
51
|
)
|
|
54
52
|
|
|
55
|
-
result = await Get(FallibleProcessResult,
|
|
53
|
+
result = await Get(FallibleProcessResult, Process, process)
|
|
56
54
|
|
|
57
55
|
stdout = result.stdout.decode()
|
|
58
56
|
stderr = result.stderr.decode()
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Rules for Ruff formatting."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from dataclasses import dataclass
|
|
6
4
|
from typing import Iterable
|
|
7
5
|
|
|
@@ -65,11 +63,11 @@ async def run_ruff_fmt(
|
|
|
65
63
|
)
|
|
66
64
|
|
|
67
65
|
# Get source files
|
|
68
|
-
source_files_request = SourceFilesRequest(
|
|
66
|
+
source_files_request: SourceFilesRequest = SourceFilesRequest(
|
|
69
67
|
sources_fields=[fs.sources for fs in field_sets],
|
|
70
68
|
for_sources_types=(BaselineSourcesField,),
|
|
71
69
|
)
|
|
72
|
-
sources = await Get(SourceFiles,
|
|
70
|
+
sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
|
|
73
71
|
|
|
74
72
|
if not sources.files:
|
|
75
73
|
return FmtResult(
|
|
@@ -91,7 +89,7 @@ async def run_ruff_fmt(
|
|
|
91
89
|
*sources.files,
|
|
92
90
|
]
|
|
93
91
|
|
|
94
|
-
process = Process(
|
|
92
|
+
process: Process = Process(
|
|
95
93
|
argv=argv,
|
|
96
94
|
input_digest=sources.snapshot.digest,
|
|
97
95
|
output_files=sources.files,
|
|
@@ -99,9 +97,10 @@ async def run_ruff_fmt(
|
|
|
99
97
|
level=LogLevel.DEBUG,
|
|
100
98
|
)
|
|
101
99
|
|
|
102
|
-
result = await Get(FallibleProcessResult,
|
|
100
|
+
result = await Get(FallibleProcessResult, Process, process)
|
|
103
101
|
|
|
104
|
-
|
|
102
|
+
output_digest: Digest = result.output_digest
|
|
103
|
+
output_snapshot = await Get(Snapshot, Digest, output_digest)
|
|
105
104
|
|
|
106
105
|
return FmtResult(
|
|
107
106
|
input=sources.snapshot,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Rules for Ruff linting."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from dataclasses import dataclass
|
|
6
4
|
from typing import Iterable
|
|
7
5
|
|
|
@@ -77,11 +75,11 @@ async def run_ruff_lint(
|
|
|
77
75
|
)
|
|
78
76
|
|
|
79
77
|
# Get source files
|
|
80
|
-
source_files_request = SourceFilesRequest(
|
|
78
|
+
source_files_request: SourceFilesRequest = SourceFilesRequest(
|
|
81
79
|
sources_fields=[fs.sources for fs in field_sets],
|
|
82
80
|
for_sources_types=(BaselineSourcesField,),
|
|
83
81
|
)
|
|
84
|
-
sources = await Get(SourceFiles,
|
|
82
|
+
sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
|
|
85
83
|
|
|
86
84
|
if not sources.files:
|
|
87
85
|
return LintResult(
|
|
@@ -107,14 +105,14 @@ async def run_ruff_lint(
|
|
|
107
105
|
*sources.files,
|
|
108
106
|
]
|
|
109
107
|
|
|
110
|
-
process = Process(
|
|
108
|
+
process: Process = Process(
|
|
111
109
|
argv=argv,
|
|
112
110
|
input_digest=sources.snapshot.digest,
|
|
113
111
|
description=f"Run Ruff lint on {len(sources.files)} files",
|
|
114
112
|
level=LogLevel.DEBUG,
|
|
115
113
|
)
|
|
116
114
|
|
|
117
|
-
result = await Get(FallibleProcessResult,
|
|
115
|
+
result = await Get(FallibleProcessResult, Process, process)
|
|
118
116
|
|
|
119
117
|
return LintResult(
|
|
120
118
|
exit_code=result.exit_code,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Rules for pytest testing with coverage."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from dataclasses import dataclass
|
|
6
4
|
from typing import Iterable
|
|
7
5
|
|
|
@@ -73,18 +71,18 @@ async def run_pytest(
|
|
|
73
71
|
)
|
|
74
72
|
|
|
75
73
|
# Get test source files
|
|
76
|
-
test_source_files_request = SourceFilesRequest(
|
|
74
|
+
test_source_files_request: SourceFilesRequest = SourceFilesRequest(
|
|
77
75
|
sources_fields=[fs.test_sources for fs in field_sets],
|
|
78
76
|
for_sources_types=(BaselineTestSourcesField,),
|
|
79
77
|
)
|
|
80
|
-
test_sources = await Get(SourceFiles,
|
|
78
|
+
test_sources = await Get(SourceFiles, SourceFilesRequest, test_source_files_request)
|
|
81
79
|
|
|
82
80
|
# Get source files for coverage
|
|
83
|
-
source_files_request = SourceFilesRequest(
|
|
81
|
+
source_files_request: SourceFilesRequest = SourceFilesRequest(
|
|
84
82
|
sources_fields=[fs.sources for fs in field_sets],
|
|
85
83
|
for_sources_types=(BaselineSourcesField,),
|
|
86
84
|
)
|
|
87
|
-
sources = await Get(SourceFiles,
|
|
85
|
+
sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
|
|
88
86
|
|
|
89
87
|
if not test_sources.files:
|
|
90
88
|
return TestResult(
|
|
@@ -121,14 +119,14 @@ async def run_pytest(
|
|
|
121
119
|
*test_sources.files,
|
|
122
120
|
]
|
|
123
121
|
|
|
124
|
-
process = Process(
|
|
122
|
+
process: Process = Process(
|
|
125
123
|
argv=argv,
|
|
126
124
|
input_digest=test_sources.snapshot.digest,
|
|
127
125
|
description=f"Run pytest on {len(test_sources.files)} test files",
|
|
128
126
|
level=LogLevel.DEBUG,
|
|
129
127
|
)
|
|
130
128
|
|
|
131
|
-
result = await Get(FallibleProcessResult,
|
|
129
|
+
result = await Get(FallibleProcessResult, Process, process)
|
|
132
130
|
|
|
133
131
|
return TestResult(
|
|
134
132
|
exit_code=result.exit_code,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""Rules for ty type checking."""
|
|
2
2
|
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
3
|
from dataclasses import dataclass
|
|
6
4
|
from typing import Iterable
|
|
7
5
|
|
|
@@ -82,11 +80,11 @@ async def run_ty_check(
|
|
|
82
80
|
)
|
|
83
81
|
|
|
84
82
|
# Get source files
|
|
85
|
-
source_files_request = SourceFilesRequest(
|
|
83
|
+
source_files_request: SourceFilesRequest = SourceFilesRequest(
|
|
86
84
|
sources_fields=[fs.sources for fs in field_sets],
|
|
87
85
|
for_sources_types=(BaselineSourcesField,),
|
|
88
86
|
)
|
|
89
|
-
sources = await Get(SourceFiles,
|
|
87
|
+
sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
|
|
90
88
|
|
|
91
89
|
if not sources.files:
|
|
92
90
|
return CheckResults(
|
|
@@ -114,14 +112,14 @@ async def run_ty_check(
|
|
|
114
112
|
*sources.files,
|
|
115
113
|
]
|
|
116
114
|
|
|
117
|
-
process = Process(
|
|
115
|
+
process: Process = Process(
|
|
118
116
|
argv=argv,
|
|
119
117
|
input_digest=sources.snapshot.digest,
|
|
120
118
|
description=f"Run ty type check on {len(sources.files)} files",
|
|
121
119
|
level=LogLevel.DEBUG,
|
|
122
120
|
)
|
|
123
121
|
|
|
124
|
-
result = await Get(FallibleProcessResult,
|
|
122
|
+
result = await Get(FallibleProcessResult, Process, process)
|
|
125
123
|
|
|
126
124
|
return CheckResults(
|
|
127
125
|
results=[
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
pants_baseline/__about__.py,sha256=emEUrAUfvUyL9_8_zLXhpGfpLneSXOrp3muo2ermC_k,98
|
|
2
|
-
pants_baseline/__init__.py,sha256=uVRGi1D2gFjc7emmeewWdcvpO-NsUuKsMbX3rztOxWU,655
|
|
3
|
-
pants_baseline/register.py,sha256=AnQrzGYcPY4f7jMvgDVvs9bo-oY1XgOAwEO3fo813yg,1656
|
|
4
|
-
pants_baseline/targets.py,sha256=G8ejj3QYaGHtLHbxirTyTjnEAWYxlpHFHYKV-_B4lMo,3300
|
|
5
|
-
pants_baseline/goals/__init__.py,sha256=pf6KU2CIQuDkx8ER3IS0H-kuNbBtX-AH5B5SnSP9_yw,192
|
|
6
|
-
pants_baseline/goals/audit.py,sha256=pzw1iczFb2yZKUXzQ9oggXUikv3uoZ-Nc5tVFJeTRLA,2339
|
|
7
|
-
pants_baseline/goals/fmt.py,sha256=QNeQHBqR-wdLKE0oTkI3jtE3sFOmOp4EP0VXGkmG6Gg,1731
|
|
8
|
-
pants_baseline/goals/lint.py,sha256=hvIRPd-zfh5zC6Q_RvEWSbqJyszGEtvCpPdKwrTe0Vo,1867
|
|
9
|
-
pants_baseline/goals/test.py,sha256=cUSE7NyuXaEtZnBe22MqPAu-Fqjtn5oCpttmeU1XIk4,1590
|
|
10
|
-
pants_baseline/goals/typecheck.py,sha256=LuuOW3lvzOhgsNf5-W0SC1jvNnI5Nt4ZQAGwOPg6ZoA,1706
|
|
11
|
-
pants_baseline/rules/__init__.py,sha256=UpvDpGVImhRfp2_VeUNsRPGiWjBbMI6AV1-Yx3kS0Gg,252
|
|
12
|
-
pants_baseline/rules/audit_rules.py,sha256=aauxy-yjah19EVBjWDOcwsRvQAIhsAtLg5VOKCbsRaM,1918
|
|
13
|
-
pants_baseline/rules/fmt_rules.py,sha256=dxUyDcRHPPk04_q2ITDKu8VEvHV-vDFDaY99YCvE_yk,3534
|
|
14
|
-
pants_baseline/rules/lint_rules.py,sha256=BKoGyfO66hSnieMkZ8f0ghpoVQR0eSIZtZglmCPkPEA,3862
|
|
15
|
-
pants_baseline/rules/test_rules.py,sha256=gZug806LGT2Vr_GFhUdjAaRrg9RbVda-_78XhXcr0f0,4218
|
|
16
|
-
pants_baseline/rules/typecheck_rules.py,sha256=JxkvJ6lJn_UvDF4IMMmmBAPWiw6kms_hTrdUE_EAzs8,4006
|
|
17
|
-
pants_baseline/subsystems/__init__.py,sha256=LteH_qmUIgRAnXYmmi7f6o894QfpY3hMNH5dlvJbSoM,387
|
|
18
|
-
pants_baseline/subsystems/baseline.py,sha256=M20muLytoWZnA4ZY3lkbSsdCXt6OMPH6IMJfXULAQSo,2049
|
|
19
|
-
pants_baseline/subsystems/ruff.py,sha256=v0yHmbdgsPMMgjxJrs-YaKPE_n7rE6h-D0HGhXheyyE,2601
|
|
20
|
-
pants_baseline/subsystems/ty.py,sha256=6M205VZD5TpX6T4vWZ4UFs5Y3T2rGqYtzidmiRh_6kg,2126
|
|
21
|
-
pants_baseline/subsystems/uv.py,sha256=K6G8KR3l-Jo18aMh183gfhEelJR57cb20yIqKUMw3K0,1851
|
|
22
|
-
jaymd96_pants_baseline-0.1.2.dist-info/METADATA,sha256=iahXBTWMePOuc64POXU-cljsgB4nyDv2eT1ALiXmrIM,7934
|
|
23
|
-
jaymd96_pants_baseline-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
24
|
-
jaymd96_pants_baseline-0.1.2.dist-info/licenses/LICENSE,sha256=oLGLZv7XKM_oKCbdMW1bZB37SXsdexmhNSuh3Xg4m4I,10754
|
|
25
|
-
jaymd96_pants_baseline-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
{jaymd96_pants_baseline-0.1.2.dist-info → jaymd96_pants_baseline-0.1.7.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|