jaymd96-pants-baseline 0.1.1__tar.gz → 0.1.6__tar.gz

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.
Files changed (33) hide show
  1. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/PKG-INFO +1 -1
  2. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/__about__.py +1 -1
  3. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/audit.py +5 -9
  4. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/register.py +0 -4
  5. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/audit_rules.py +1 -3
  6. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/fmt_rules.py +7 -10
  7. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/lint_rules.py +5 -9
  8. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/test_rules.py +9 -15
  9. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/typecheck_rules.py +5 -9
  10. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/subsystems/ruff.py +2 -2
  11. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/subsystems/ty.py +2 -2
  12. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/subsystems/uv.py +2 -2
  13. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/.gitignore +0 -0
  14. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/LICENSE +0 -0
  15. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/README.md +0 -0
  16. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/pyproject.toml +0 -0
  17. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/__init__.py +0 -0
  18. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/__init__.py +0 -0
  19. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/fmt.py +0 -0
  20. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/lint.py +0 -0
  21. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/test.py +0 -0
  22. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/goals/typecheck.py +0 -0
  23. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/rules/__init__.py +0 -0
  24. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/subsystems/__init__.py +0 -0
  25. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/subsystems/baseline.py +0 -0
  26. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/src/pants_baseline/targets.py +0 -0
  27. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/__init__.py +0 -0
  28. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/conftest.py +0 -0
  29. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/integration/__init__.py +0 -0
  30. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/integration/test_goals.py +0 -0
  31. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/unit/__init__.py +0 -0
  32. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/unit/test_subsystems.py +0 -0
  33. {jaymd96_pants_baseline-0.1.1 → jaymd96_pants_baseline-0.1.6}/tests/unit/test_targets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaymd96-pants-baseline
3
- Version: 0.1.1
3
+ Version: 0.1.6
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
1
  """Version information for jaymd96-pants-baseline."""
2
2
 
3
- __version__ = "0.1.1"
3
+ __version__ = "0.1.6"
4
4
  __author__ = "James"
@@ -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
@@ -49,14 +47,12 @@ async def run_baseline_audit(
49
47
  console.print_stdout(f" Ignoring: {', '.join(uv_subsystem.audit_ignore_vulns)}")
50
48
  console.print_stdout("")
51
49
 
52
- result = await Get(
53
- AuditResult,
54
- UvAuditRequest(
55
- lock_file=uv_subsystem.lock_file,
56
- ignore_vulns=tuple(uv_subsystem.audit_ignore_vulns),
57
- output_format=uv_subsystem.output_format,
58
- ),
50
+ audit_request: UvAuditRequest = UvAuditRequest(
51
+ lock_file=uv_subsystem.lock_file,
52
+ ignore_vulns=tuple(uv_subsystem.audit_ignore_vulns),
53
+ output_format=uv_subsystem.output_format,
59
54
  )
55
+ result = await Get(AuditResult, UvAuditRequest, audit_request)
60
56
 
61
57
  if result.stdout:
62
58
  console.print_stdout(result.stdout)
@@ -34,10 +34,6 @@ def rules() -> Iterable[Rule]:
34
34
  *collect_rules(typecheck_goal),
35
35
  *collect_rules(test_goal),
36
36
  *collect_rules(audit_goal),
37
- *BaselineSubsystem.rules(),
38
- *RuffSubsystem.rules(),
39
- *TySubsystem.rules(),
40
- *UvSubsystem.rules(),
41
37
  ]
42
38
 
43
39
 
@@ -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,7 +44,7 @@ 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,
@@ -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,13 +63,11 @@ async def run_ruff_fmt(
65
63
  )
66
64
 
67
65
  # Get source files
68
- sources = await Get(
69
- SourceFiles,
70
- SourceFilesRequest(
71
- sources_fields=[fs.sources for fs in field_sets],
72
- for_sources_types=(BaselineSourcesField,),
73
- ),
66
+ source_files_request: SourceFilesRequest = SourceFilesRequest(
67
+ sources_fields=[fs.sources for fs in field_sets],
68
+ for_sources_types=(BaselineSourcesField,),
74
69
  )
70
+ sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
75
71
 
76
72
  if not sources.files:
77
73
  return FmtResult(
@@ -93,7 +89,7 @@ async def run_ruff_fmt(
93
89
  *sources.files,
94
90
  ]
95
91
 
96
- process = Process(
92
+ process: Process = Process(
97
93
  argv=argv,
98
94
  input_digest=sources.snapshot.digest,
99
95
  output_files=sources.files,
@@ -103,7 +99,8 @@ async def run_ruff_fmt(
103
99
 
104
100
  result = await Get(FallibleProcessResult, Process, process)
105
101
 
106
- output_snapshot = await Get(Snapshot, Digest, result.output_digest)
102
+ output_digest: Digest = result.output_digest
103
+ output_snapshot = await Get(Snapshot, Digest, output_digest)
107
104
 
108
105
  return FmtResult(
109
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,13 +75,11 @@ async def run_ruff_lint(
77
75
  )
78
76
 
79
77
  # Get source files
80
- sources = await Get(
81
- SourceFiles,
82
- SourceFilesRequest(
83
- sources_fields=[fs.sources for fs in field_sets],
84
- for_sources_types=(BaselineSourcesField,),
85
- ),
78
+ source_files_request: SourceFilesRequest = SourceFilesRequest(
79
+ sources_fields=[fs.sources for fs in field_sets],
80
+ for_sources_types=(BaselineSourcesField,),
86
81
  )
82
+ sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
87
83
 
88
84
  if not sources.files:
89
85
  return LintResult(
@@ -109,7 +105,7 @@ async def run_ruff_lint(
109
105
  *sources.files,
110
106
  ]
111
107
 
112
- process = Process(
108
+ process: Process = Process(
113
109
  argv=argv,
114
110
  input_digest=sources.snapshot.digest,
115
111
  description=f"Run Ruff lint on {len(sources.files)} files",
@@ -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,22 +71,18 @@ async def run_pytest(
73
71
  )
74
72
 
75
73
  # Get test source files
76
- test_sources = await Get(
77
- SourceFiles,
78
- SourceFilesRequest(
79
- sources_fields=[fs.test_sources for fs in field_sets],
80
- for_sources_types=(BaselineTestSourcesField,),
81
- ),
74
+ test_source_files_request: SourceFilesRequest = SourceFilesRequest(
75
+ sources_fields=[fs.test_sources for fs in field_sets],
76
+ for_sources_types=(BaselineTestSourcesField,),
82
77
  )
78
+ test_sources = await Get(SourceFiles, SourceFilesRequest, test_source_files_request)
83
79
 
84
80
  # Get source files for coverage
85
- sources = await Get(
86
- SourceFiles,
87
- SourceFilesRequest(
88
- sources_fields=[fs.sources for fs in field_sets],
89
- for_sources_types=(BaselineSourcesField,),
90
- ),
81
+ source_files_request: SourceFilesRequest = SourceFilesRequest(
82
+ sources_fields=[fs.sources for fs in field_sets],
83
+ for_sources_types=(BaselineSourcesField,),
91
84
  )
85
+ sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
92
86
 
93
87
  if not test_sources.files:
94
88
  return TestResult(
@@ -125,7 +119,7 @@ async def run_pytest(
125
119
  *test_sources.files,
126
120
  ]
127
121
 
128
- process = Process(
122
+ process: Process = Process(
129
123
  argv=argv,
130
124
  input_digest=test_sources.snapshot.digest,
131
125
  description=f"Run pytest on {len(test_sources.files)} test files",
@@ -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,13 +80,11 @@ async def run_ty_check(
82
80
  )
83
81
 
84
82
  # Get source files
85
- sources = await Get(
86
- SourceFiles,
87
- SourceFilesRequest(
88
- sources_fields=[fs.sources for fs in field_sets],
89
- for_sources_types=(BaselineSourcesField,),
90
- ),
83
+ source_files_request: SourceFilesRequest = SourceFilesRequest(
84
+ sources_fields=[fs.sources for fs in field_sets],
85
+ for_sources_types=(BaselineSourcesField,),
91
86
  )
87
+ sources = await Get(SourceFiles, SourceFilesRequest, source_files_request)
92
88
 
93
89
  if not sources.files:
94
90
  return CheckResults(
@@ -116,7 +112,7 @@ async def run_ty_check(
116
112
  *sources.files,
117
113
  ]
118
114
 
119
- process = Process(
115
+ process: Process = Process(
120
116
  argv=argv,
121
117
  input_digest=sources.snapshot.digest,
122
118
  description=f"Run ty type check on {len(sources.files)} files",
@@ -13,8 +13,8 @@ class RuffSubsystem(Subsystem):
13
13
  It replaces Black, isort, Flake8, and many other tools in a single binary.
14
14
  """
15
15
 
16
- options_scope = "ruff"
17
- help = "Ruff linting and formatting configuration."
16
+ options_scope = "baseline-ruff"
17
+ help = "Ruff linting and formatting configuration for baseline plugin."
18
18
 
19
19
  version = StrOption(
20
20
  default="0.2.0",
@@ -20,8 +20,8 @@ class TySubsystem(Subsystem):
20
20
  - Rust implementation with obsessive performance focus
21
21
  """
22
22
 
23
- options_scope = "ty"
24
- help = "ty type checker configuration (Astral's next-gen type checker)."
23
+ options_scope = "baseline-ty"
24
+ help = "ty type checker configuration for baseline plugin (Astral's next-gen type checker)."
25
25
 
26
26
  version = StrOption(
27
27
  default="0.1.0",
@@ -18,8 +18,8 @@ class UvSubsystem(Subsystem):
18
18
  - Virtual environment management
19
19
  """
20
20
 
21
- options_scope = "uv"
22
- help = "uv dependency management and security auditing configuration."
21
+ options_scope = "baseline-uv"
22
+ help = "uv dependency management and security auditing configuration for baseline plugin."
23
23
 
24
24
  version = StrOption(
25
25
  default="0.5.0",