jaymd96-pants-baseline 0.2.9__py3-none-any.whl → 0.2.13__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.9.dist-info → jaymd96_pants_baseline-0.2.13.dist-info}/METADATA +1 -1
- {jaymd96_pants_baseline-0.2.9.dist-info → jaymd96_pants_baseline-0.2.13.dist-info}/RECORD +8 -8
- pants_baseline/__about__.py +1 -1
- pants_baseline/rules/fmt_rules.py +7 -14
- pants_baseline/rules/lint_rules.py +16 -20
- pants_baseline/subsystems/ruff.py +5 -5
- {jaymd96_pants_baseline-0.2.9.dist-info → jaymd96_pants_baseline-0.2.13.dist-info}/WHEEL +0 -0
- {jaymd96_pants_baseline-0.2.9.dist-info → jaymd96_pants_baseline-0.2.13.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.13
|
|
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=On-8H4CVaZnmDHdrclfVLENOgMLUZoIe0eVC5y4_GDg,99
|
|
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=1ROcYLg3JYoHIxxaytrEFHuqL3cvCmKWqkNIl7G6RpU,1426
|
|
@@ -11,16 +11,16 @@ 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=p7nvsISynBDkCGDOjgleEKwW7cmgs3YDSIQEOTGvur0,3447
|
|
15
|
+
pants_baseline/rules/lint_rules.py,sha256=TP5x52cVPXPFaxWFtdGptL5RTXkDmGpRBJsZ33TTUYI,4200
|
|
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
|
|
19
19
|
pants_baseline/subsystems/baseline.py,sha256=CU8ZhNCJw8BSXSyuvZ1eH-Y2CSPggp2O-I2bVqF3WEU,2187
|
|
20
|
-
pants_baseline/subsystems/ruff.py,sha256=
|
|
20
|
+
pants_baseline/subsystems/ruff.py,sha256=qUt7cFVpaVYrrbzY6U6hCTloqny3KopyJ4I7UJPX3X0,4610
|
|
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.13.dist-info/METADATA,sha256=sXYVvhf7dCZ17cLRud1aJJqxXDNTnmienK1dXGD25q8,8765
|
|
24
|
+
jaymd96_pants_baseline-0.2.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
25
|
+
jaymd96_pants_baseline-0.2.13.dist-info/licenses/LICENSE,sha256=oLGLZv7XKM_oKCbdMW1bZB37SXsdexmhNSuh3Xg4m4I,10754
|
|
26
|
+
jaymd96_pants_baseline-0.2.13.dist-info/RECORD,,
|
pants_baseline/__about__.py
CHANGED
|
@@ -6,12 +6,12 @@ from typing import Any, Iterable
|
|
|
6
6
|
from pants.core.goals.fmt import FmtResult, FmtTargetsRequest
|
|
7
7
|
from pants.core.util_rules.external_tool import DownloadedExternalTool, download_external_tool
|
|
8
8
|
from pants.core.util_rules.partitions import PartitionerType
|
|
9
|
-
from pants.engine.fs import Digest, MergeDigests
|
|
10
|
-
from pants.engine.intrinsics import
|
|
9
|
+
from pants.engine.fs import Digest, MergeDigests
|
|
10
|
+
from pants.engine.intrinsics import merge_digests
|
|
11
11
|
from pants.engine.platform import Platform
|
|
12
12
|
from pants.engine.process import FallibleProcessResult, Process, execute_process_or_raise
|
|
13
13
|
from pants.engine.rules import collect_rules, implicitly, rule
|
|
14
|
-
from pants.engine.target import FieldSet
|
|
14
|
+
from pants.engine.target import FieldSet
|
|
15
15
|
from pants.util.logging import LogLevel
|
|
16
16
|
from pants.util.meta import classproperty
|
|
17
17
|
|
|
@@ -75,13 +75,12 @@ async def run_ruff_fmt(
|
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
# Build Ruff format command
|
|
78
|
+
# Note: quote-style and indent-style are config file options only in ruff 0.9+
|
|
78
79
|
argv = [
|
|
79
80
|
downloaded_ruff.exe,
|
|
80
81
|
"format",
|
|
81
82
|
f"--target-version=py{baseline_subsystem.python_version.replace('.', '')}",
|
|
82
83
|
f"--line-length={baseline_subsystem.line_length}",
|
|
83
|
-
f"--quote-style={ruff_subsystem.quote_style}",
|
|
84
|
-
f"--indent-style={ruff_subsystem.indent_style}",
|
|
85
84
|
*snapshot.files,
|
|
86
85
|
]
|
|
87
86
|
|
|
@@ -96,15 +95,9 @@ async def run_ruff_fmt(
|
|
|
96
95
|
)
|
|
97
96
|
)
|
|
98
97
|
)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return FmtResult(
|
|
102
|
-
input=snapshot,
|
|
103
|
-
output=output_snapshot,
|
|
104
|
-
stdout=result.stdout.decode(),
|
|
105
|
-
stderr=result.stderr.decode(),
|
|
106
|
-
formatter_name="baseline-ruff-fmt",
|
|
107
|
-
)
|
|
98
|
+
|
|
99
|
+
# FmtResult.create() is async and takes 2 args in Pants 2.30+
|
|
100
|
+
return await FmtResult.create(request, result)
|
|
108
101
|
|
|
109
102
|
|
|
110
103
|
def rules() -> Iterable:
|
|
@@ -8,11 +8,11 @@ from pants.core.util_rules.external_tool import DownloadedExternalTool, download
|
|
|
8
8
|
from pants.core.util_rules.partitions import PartitionerType
|
|
9
9
|
from pants.core.util_rules.source_files import SourceFiles, SourceFilesRequest, determine_source_files
|
|
10
10
|
from pants.engine.fs import Digest, MergeDigests
|
|
11
|
-
from pants.engine.intrinsics import merge_digests
|
|
11
|
+
from pants.engine.intrinsics import execute_process, merge_digests
|
|
12
12
|
from pants.engine.platform import Platform
|
|
13
|
-
from pants.engine.process import
|
|
13
|
+
from pants.engine.process import Process
|
|
14
14
|
from pants.engine.rules import collect_rules, implicitly, rule
|
|
15
|
-
from pants.engine.target import FieldSet
|
|
15
|
+
from pants.engine.target import FieldSet
|
|
16
16
|
from pants.util.logging import LogLevel
|
|
17
17
|
from pants.util.meta import classproperty
|
|
18
18
|
|
|
@@ -89,35 +89,31 @@ async def run_ruff_lint(
|
|
|
89
89
|
select_args = [f"--select={','.join(ruff_subsystem.select)}"] if ruff_subsystem.select else []
|
|
90
90
|
ignore_args = [f"--ignore={','.join(ruff_subsystem.ignore)}"] if ruff_subsystem.ignore else []
|
|
91
91
|
|
|
92
|
+
# Build Ruff check command
|
|
93
|
+
# Note: line-length is a config file option only in ruff 0.9+
|
|
92
94
|
argv = [
|
|
93
95
|
downloaded_ruff.exe,
|
|
94
96
|
"check",
|
|
95
97
|
f"--target-version=py{baseline_subsystem.python_version.replace('.', '')}",
|
|
96
|
-
f"--line-length={baseline_subsystem.line_length}",
|
|
97
98
|
*select_args,
|
|
98
99
|
*ignore_args,
|
|
99
100
|
"--output-format=concise",
|
|
100
101
|
*sources.files,
|
|
101
102
|
]
|
|
102
103
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
)
|
|
104
|
+
# execute_process returns FallibleProcessResult which LintResult.create accepts directly
|
|
105
|
+
process_result = await execute_process(
|
|
106
|
+
Process(
|
|
107
|
+
argv=argv,
|
|
108
|
+
input_digest=input_digest,
|
|
109
|
+
description=f"Run Ruff lint on {len(sources.files)} files",
|
|
110
|
+
level=LogLevel.DEBUG,
|
|
111
|
+
),
|
|
112
|
+
**implicitly(),
|
|
112
113
|
)
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
exit_code=result.exit_code,
|
|
117
|
-
stdout=result.stdout.decode(),
|
|
118
|
-
stderr=result.stderr.decode(),
|
|
119
|
-
strip_chroot_path=True,
|
|
120
|
-
)
|
|
115
|
+
# LintResult.create() takes 2 args in Pants 2.30+
|
|
116
|
+
return LintResult.create(request, process_result)
|
|
121
117
|
|
|
122
118
|
|
|
123
119
|
def rules() -> Iterable:
|
|
@@ -22,11 +22,11 @@ class RuffSubsystem(ExternalTool):
|
|
|
22
22
|
|
|
23
23
|
default_version = "0.9.6"
|
|
24
24
|
default_known_versions = [
|
|
25
|
-
# Ruff 0.9.6 -
|
|
26
|
-
"0.9.6|macos_arm64|
|
|
27
|
-
"0.9.6|macos_x86_64|
|
|
28
|
-
"0.9.6|linux_arm64|
|
|
29
|
-
"0.9.6|linux_x86_64|
|
|
25
|
+
# Ruff 0.9.6 - Format: version|platform|sha256_hash|file_size_bytes
|
|
26
|
+
"0.9.6|macos_arm64|a3132eb5e3d95f36d378144082276fbed0309789dadb19d8a4c41ec5e80451fb|11124436",
|
|
27
|
+
"0.9.6|macos_x86_64|ec88c095036b25e95391ea202fcc9496d565f4e43152db10785eb9757ea0815d|11663591",
|
|
28
|
+
"0.9.6|linux_arm64|cf796c953def5a7102002372893942fac875ac718355698a4a70405104dfbb6c|11946730",
|
|
29
|
+
"0.9.6|linux_x86_64|bed850f15d4d5aaaef2b6a131bfecd5b9d7d3191596249d07e576bd9fd37078e|12511815",
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
def generate_url(self, plat: Platform) -> str:
|
|
File without changes
|
{jaymd96_pants_baseline-0.2.9.dist-info → jaymd96_pants_baseline-0.2.13.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|