sarj-python-lint 0.23.0__tar.gz → 0.25.0__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.
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/PKG-INFO +35 -3
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/README.md +34 -2
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/pyproject.toml +1 -1
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_registry.py +39 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/conditional_assertion_in_test.py +1265 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/duplicate_test_body.py +701 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/interaction_only_test.py +712 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_comment_cruft.py +44 -2
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_gen_random_uuid_in_sql.py +28 -2
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_offset_pagination.py +35 -4
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/no_patching_system_under_test.py +734 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_repeated_string_literal.py +14 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_restated_comment.py +52 -6
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_stdlib_logging.py +35 -9
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_tautological_expect.py +57 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/over_mocked_test.py +1006 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_fstring_over_concat.py +546 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_library_fake.py +631 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_match_pattern_destructuring.py +427 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_non_nullable_collection.py +144 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_or_pattern.py +370 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/prefer_real_store_in_tests.py +613 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/require_port_for_service.py +759 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +151 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/tautological_mock_assertion.py +531 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/trailing_value_narration.py +25 -2
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/trivially_true_assertion.py +772 -0
- sarj_python_lint-0.25.0/src/sarj_python_lint/rules/unused_mock_setup.py +491 -0
- sarj_python_lint-0.23.0/src/sarj_python_lint/rules/store_insert_requires_on_conflict.py +0 -93
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/.gitignore +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/__init__.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/__main__.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/_ratchet_cli.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/_secret_names.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/_version.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/py.typed +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/ratchet.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rule_base.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/__init__.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_comments.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_first_party.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_logging.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_paths.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_pytest.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_sql.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/_suppression_comments.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/fixture_returns_bare_tuple.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/inefficient_string_concat_in_loop.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/kwarg_heavy_construction_in_test.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/kwonly_same_type_params.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/mock_without_spec.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_aggregation_in_store_query.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_cors_wildcard_with_credentials.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_fat_try_blocks.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_file_level_escape_hatch_noqa.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_file_level_suppression.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_first_party_private_import.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_fstring_in_log.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_isinstance_union_chain.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_optional_tenant_predicate.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_query_with_many_joins.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_raw_sql_in_tests.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_secret_in_log.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_select_star.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_sentinel_return_on_except.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_sequential_await.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_sleep_in_test_body.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/no_unreachable_after_terminal.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/parametrize_case_needs_id.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_class_row.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_constant_time_secret_compare.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_match_assert_never.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_module_level_constant.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_namedtuple_over_tuple_return.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_str_enum.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_struct_over_namedtuple.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/prefer_timedelta_for_durations.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/pydantic_at_boundaries.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/redundant_docstring.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/single_public_export.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/sleep_with_computed_arg_in_test.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/stepdown.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/test_loops_over_literal_cases.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/xfail_requires_strict.py +0 -0
- {sarj_python_lint-0.23.0 → sarj_python_lint-0.25.0}/src/sarj_python_lint/rules/zero_assertion_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sarj-python-lint
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.0
|
|
4
4
|
Summary: Custom Python lint rules — AST-based, pre-commit-friendly, hypermodern defaults
|
|
5
5
|
Project-URL: Homepage, https://github.com/sarj-ai/standards/tree/main/packages/python
|
|
6
6
|
Project-URL: Repository, https://github.com/sarj-ai/standards
|
|
@@ -28,7 +28,7 @@ uv tool install sarj-python-lint
|
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
30
|
- repo: https://github.com/sarj-ai/standards
|
|
31
|
-
rev: python-v0.
|
|
31
|
+
rev: python-v0.24.0
|
|
32
32
|
hooks:
|
|
33
33
|
- id: sarj-no-sequential-await
|
|
34
34
|
- id: sarj-inefficient-string-concat-in-loop
|
|
@@ -40,6 +40,7 @@ uv tool install sarj-python-lint
|
|
|
40
40
|
- id: sarj-prefer-struct-over-namedtuple
|
|
41
41
|
- id: sarj-no-comment-cruft
|
|
42
42
|
- id: sarj-no-fstring-in-log
|
|
43
|
+
- id: sarj-prefer-non-nullable-collection # SARJ074
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
### Test-quality rules (0.15.0)
|
|
@@ -146,6 +147,37 @@ decisions into one unreviewable one and pre-authorizes every mock added later.
|
|
|
146
147
|
Scoped exemptions for mechanical codes (`E501`, `F401`, `UP035`) are never
|
|
147
148
|
flagged — measured across five repos those are the entire population.
|
|
148
149
|
|
|
150
|
+
|
|
151
|
+
### Mock-quality and real-dependency rules (0.24.0)
|
|
152
|
+
|
|
153
|
+
The second test-quality wave. Where the 0.15.0 family asks "does this test assert
|
|
154
|
+
anything?", this one asks "does it exercise anything real?" — it pushes suites off
|
|
155
|
+
hand-rolled doubles and onto the real store, the real database and a maintained fake
|
|
156
|
+
library. Measured against bulbul, noura-be, five other first-party repos and fourteen
|
|
157
|
+
OSS corpora; two candidates were dropped outright when the corpus showed they only
|
|
158
|
+
duplicated ruff.
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
- id: sarj-prefer-real-store-in-tests # SARJ058
|
|
162
|
+
- id: sarj-prefer-library-fake # SARJ059
|
|
163
|
+
- id: sarj-tautological-mock-assertion # SARJ060
|
|
164
|
+
- id: sarj-no-patching-system-under-test # SARJ061
|
|
165
|
+
- id: sarj-over-mocked-test # SARJ062
|
|
166
|
+
- id: sarj-interaction-only-test # SARJ063
|
|
167
|
+
- id: sarj-trivially-true-assertion # SARJ064
|
|
168
|
+
- id: sarj-conditional-assertion-in-test # SARJ065
|
|
169
|
+
- id: sarj-duplicate-test-body # SARJ066
|
|
170
|
+
- id: sarj-unused-mock-setup # SARJ067
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Expressiveness rules (0.24.0)
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
- id: sarj-prefer-fstring-over-concat # SARJ068
|
|
177
|
+
- id: sarj-prefer-match-pattern-destructuring # SARJ069
|
|
178
|
+
- id: sarj-prefer-or-pattern # SARJ070
|
|
179
|
+
- id: sarj-require-port-for-service # SARJ071
|
|
180
|
+
```
|
|
149
181
|
### Suppression ratchet (`sarj-ratchet`, 0.21.0)
|
|
150
182
|
|
|
151
183
|
```yaml
|
|
@@ -196,7 +228,7 @@ sarj-python-lint check --rule mock-without-spec --update-baseline test-quality-b
|
|
|
196
228
|
sarj-python-lint check --rule mock-without-spec --baseline test-quality-baseline.json python/
|
|
197
229
|
```
|
|
198
230
|
|
|
199
|
-
### Multi-tenant scoping (0.
|
|
231
|
+
### Multi-tenant scoping (0.24.0)
|
|
200
232
|
|
|
201
233
|
```yaml
|
|
202
234
|
- id: sarj-no-optional-tenant-predicate # SARJ056
|
|
@@ -10,7 +10,7 @@ uv tool install sarj-python-lint
|
|
|
10
10
|
|
|
11
11
|
```yaml
|
|
12
12
|
- repo: https://github.com/sarj-ai/standards
|
|
13
|
-
rev: python-v0.
|
|
13
|
+
rev: python-v0.24.0
|
|
14
14
|
hooks:
|
|
15
15
|
- id: sarj-no-sequential-await
|
|
16
16
|
- id: sarj-inefficient-string-concat-in-loop
|
|
@@ -22,6 +22,7 @@ uv tool install sarj-python-lint
|
|
|
22
22
|
- id: sarj-prefer-struct-over-namedtuple
|
|
23
23
|
- id: sarj-no-comment-cruft
|
|
24
24
|
- id: sarj-no-fstring-in-log
|
|
25
|
+
- id: sarj-prefer-non-nullable-collection # SARJ074
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
### Test-quality rules (0.15.0)
|
|
@@ -128,6 +129,37 @@ decisions into one unreviewable one and pre-authorizes every mock added later.
|
|
|
128
129
|
Scoped exemptions for mechanical codes (`E501`, `F401`, `UP035`) are never
|
|
129
130
|
flagged — measured across five repos those are the entire population.
|
|
130
131
|
|
|
132
|
+
|
|
133
|
+
### Mock-quality and real-dependency rules (0.24.0)
|
|
134
|
+
|
|
135
|
+
The second test-quality wave. Where the 0.15.0 family asks "does this test assert
|
|
136
|
+
anything?", this one asks "does it exercise anything real?" — it pushes suites off
|
|
137
|
+
hand-rolled doubles and onto the real store, the real database and a maintained fake
|
|
138
|
+
library. Measured against bulbul, noura-be, five other first-party repos and fourteen
|
|
139
|
+
OSS corpora; two candidates were dropped outright when the corpus showed they only
|
|
140
|
+
duplicated ruff.
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
- id: sarj-prefer-real-store-in-tests # SARJ058
|
|
144
|
+
- id: sarj-prefer-library-fake # SARJ059
|
|
145
|
+
- id: sarj-tautological-mock-assertion # SARJ060
|
|
146
|
+
- id: sarj-no-patching-system-under-test # SARJ061
|
|
147
|
+
- id: sarj-over-mocked-test # SARJ062
|
|
148
|
+
- id: sarj-interaction-only-test # SARJ063
|
|
149
|
+
- id: sarj-trivially-true-assertion # SARJ064
|
|
150
|
+
- id: sarj-conditional-assertion-in-test # SARJ065
|
|
151
|
+
- id: sarj-duplicate-test-body # SARJ066
|
|
152
|
+
- id: sarj-unused-mock-setup # SARJ067
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Expressiveness rules (0.24.0)
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
- id: sarj-prefer-fstring-over-concat # SARJ068
|
|
159
|
+
- id: sarj-prefer-match-pattern-destructuring # SARJ069
|
|
160
|
+
- id: sarj-prefer-or-pattern # SARJ070
|
|
161
|
+
- id: sarj-require-port-for-service # SARJ071
|
|
162
|
+
```
|
|
131
163
|
### Suppression ratchet (`sarj-ratchet`, 0.21.0)
|
|
132
164
|
|
|
133
165
|
```yaml
|
|
@@ -178,7 +210,7 @@ sarj-python-lint check --rule mock-without-spec --update-baseline test-quality-b
|
|
|
178
210
|
sarj-python-lint check --rule mock-without-spec --baseline test-quality-baseline.json python/
|
|
179
211
|
```
|
|
180
212
|
|
|
181
|
-
### Multi-tenant scoping (0.
|
|
213
|
+
### Multi-tenant scoping (0.24.0)
|
|
182
214
|
|
|
183
215
|
```yaml
|
|
184
216
|
- id: sarj-no-optional-tenant-predicate # SARJ056
|
|
@@ -2,10 +2,13 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
from typing import TYPE_CHECKING
|
|
4
4
|
|
|
5
|
+
from sarj_python_lint.rules.conditional_assertion_in_test import ConditionalAssertionInTest
|
|
6
|
+
from sarj_python_lint.rules.duplicate_test_body import DuplicateTestBody
|
|
5
7
|
from sarj_python_lint.rules.fixture_returns_bare_tuple import FixtureReturnsBareTuple
|
|
6
8
|
from sarj_python_lint.rules.inefficient_string_concat_in_loop import (
|
|
7
9
|
InefficientStringConcatInLoop,
|
|
8
10
|
)
|
|
11
|
+
from sarj_python_lint.rules.interaction_only_test import InteractionOnlyTest
|
|
9
12
|
from sarj_python_lint.rules.kwarg_heavy_construction_in_test import KwargHeavyConstructionInTest
|
|
10
13
|
from sarj_python_lint.rules.kwonly_same_type_params import KwonlySameTypeParams
|
|
11
14
|
from sarj_python_lint.rules.mock_without_spec import MockWithoutSpec
|
|
@@ -29,6 +32,7 @@ from sarj_python_lint.rules.no_offset_pagination import NoOffsetPagination
|
|
|
29
32
|
from sarj_python_lint.rules.no_optional_tenant_predicate import (
|
|
30
33
|
NoOptionalTenantPredicate,
|
|
31
34
|
)
|
|
35
|
+
from sarj_python_lint.rules.no_patching_system_under_test import NoPatchingSystemUnderTest
|
|
32
36
|
from sarj_python_lint.rules.no_query_with_many_joins import NoQueryWithManyJoins
|
|
33
37
|
from sarj_python_lint.rules.no_raw_sql_in_tests import NoRawSqlInTests
|
|
34
38
|
from sarj_python_lint.rules.no_repeated_string_literal import NoRepeatedStringLiteral
|
|
@@ -43,18 +47,27 @@ from sarj_python_lint.rules.no_tautological_expect import NoTautologicalExpect
|
|
|
43
47
|
from sarj_python_lint.rules.no_unreachable_after_terminal import (
|
|
44
48
|
NoUnreachableAfterTerminal,
|
|
45
49
|
)
|
|
50
|
+
from sarj_python_lint.rules.over_mocked_test import OverMockedTest
|
|
46
51
|
from sarj_python_lint.rules.parametrize_case_needs_id import ParametrizeCaseNeedsId
|
|
47
52
|
from sarj_python_lint.rules.prefer_class_row import PreferClassRow
|
|
48
53
|
from sarj_python_lint.rules.prefer_constant_time_secret_compare import (
|
|
49
54
|
PreferConstantTimeSecretCompare,
|
|
50
55
|
)
|
|
56
|
+
from sarj_python_lint.rules.prefer_fstring_over_concat import PreferFstringOverConcat
|
|
57
|
+
from sarj_python_lint.rules.prefer_library_fake import PreferLibraryFake
|
|
51
58
|
from sarj_python_lint.rules.prefer_match_assert_never import PreferMatchAssertNever
|
|
59
|
+
from sarj_python_lint.rules.prefer_match_pattern_destructuring import PreferMatchPatternDestructuring
|
|
52
60
|
from sarj_python_lint.rules.prefer_module_level_constant import (
|
|
53
61
|
PreferModuleLevelConstant,
|
|
54
62
|
)
|
|
55
63
|
from sarj_python_lint.rules.prefer_namedtuple_over_tuple_return import (
|
|
56
64
|
PreferNamedtupleOverTupleReturn,
|
|
57
65
|
)
|
|
66
|
+
from sarj_python_lint.rules.prefer_non_nullable_collection import (
|
|
67
|
+
PreferNonNullableCollection,
|
|
68
|
+
)
|
|
69
|
+
from sarj_python_lint.rules.prefer_or_pattern import PreferOrPattern
|
|
70
|
+
from sarj_python_lint.rules.prefer_real_store_in_tests import PreferRealStoreInTests
|
|
58
71
|
from sarj_python_lint.rules.prefer_str_enum import PreferStrEnum
|
|
59
72
|
from sarj_python_lint.rules.prefer_struct_over_namedtuple import (
|
|
60
73
|
PreferStructOverNamedtuple,
|
|
@@ -64,16 +77,20 @@ from sarj_python_lint.rules.prefer_timedelta_for_durations import (
|
|
|
64
77
|
)
|
|
65
78
|
from sarj_python_lint.rules.pydantic_at_boundaries import PydanticAtBoundaries
|
|
66
79
|
from sarj_python_lint.rules.redundant_docstring import RedundantDocstring
|
|
80
|
+
from sarj_python_lint.rules.require_port_for_service import RequirePortForService
|
|
67
81
|
from sarj_python_lint.rules.single_public_export import SinglePublicExport
|
|
68
82
|
from sarj_python_lint.rules.sleep_with_computed_arg_in_test import SleepWithComputedArgInTest
|
|
69
83
|
from sarj_python_lint.rules.stepdown import Stepdown
|
|
70
84
|
from sarj_python_lint.rules.store_insert_requires_on_conflict import (
|
|
71
85
|
StoreInsertRequiresOnConflict,
|
|
72
86
|
)
|
|
87
|
+
from sarj_python_lint.rules.tautological_mock_assertion import TautologicalMockAssertion
|
|
73
88
|
from sarj_python_lint.rules.test_loops_over_literal_cases import (
|
|
74
89
|
TestLoopsOverLiteralCases,
|
|
75
90
|
)
|
|
76
91
|
from sarj_python_lint.rules.trailing_value_narration import TrailingValueNarration
|
|
92
|
+
from sarj_python_lint.rules.trivially_true_assertion import TriviallyTrueAssertion
|
|
93
|
+
from sarj_python_lint.rules.unused_mock_setup import UnusedMockSetup
|
|
77
94
|
from sarj_python_lint.rules.xfail_requires_strict import XfailRequiresStrict
|
|
78
95
|
from sarj_python_lint.rules.zero_assertion_test import ZeroAssertionTest
|
|
79
96
|
|
|
@@ -102,6 +119,13 @@ if TYPE_CHECKING:
|
|
|
102
119
|
# against every corpus; that, not the narrow variant, is the case to make.),
|
|
103
120
|
# SARJ037 no-trivial-single-use-helper (prototyped and dropped for FP rate;
|
|
104
121
|
# see the 0.13.1 inlining commit for the corpus analysis).
|
|
122
|
+
# SARJ072 unbound-mock-assertion and SARJ073 raises-needs-specific-error
|
|
123
|
+
# (built, corpus-measured and dropped before ever being registered, in the
|
|
124
|
+
# wave that added SARJ058-071). SARJ072 found 0 hits across 16,130 files in
|
|
125
|
+
# 9 repos, including 0 against 8,322 real mock-assertion API uses; ruff B018
|
|
126
|
+
# covers its bare-statement shape. SARJ073 was a strict superset of ruff
|
|
127
|
+
# PT011, which this standard already enables — its one real gap,
|
|
128
|
+
# RuntimeError, is closed by `lint.flake8-pytest-style.raises-require-match-for`.
|
|
105
129
|
REGISTRY: dict[str, type[Rule]] = {
|
|
106
130
|
NoSequentialAwait.id: NoSequentialAwait,
|
|
107
131
|
InefficientStringConcatInLoop.id: InefficientStringConcatInLoop,
|
|
@@ -151,6 +175,21 @@ REGISTRY: dict[str, type[Rule]] = {
|
|
|
151
175
|
NoFileLevelEscapeHatchNoqa.id: NoFileLevelEscapeHatchNoqa,
|
|
152
176
|
NoOptionalTenantPredicate.id: NoOptionalTenantPredicate,
|
|
153
177
|
NoTautologicalExpect.id: NoTautologicalExpect,
|
|
178
|
+
PreferRealStoreInTests.id: PreferRealStoreInTests,
|
|
179
|
+
PreferLibraryFake.id: PreferLibraryFake,
|
|
180
|
+
TautologicalMockAssertion.id: TautologicalMockAssertion,
|
|
181
|
+
NoPatchingSystemUnderTest.id: NoPatchingSystemUnderTest,
|
|
182
|
+
OverMockedTest.id: OverMockedTest,
|
|
183
|
+
InteractionOnlyTest.id: InteractionOnlyTest,
|
|
184
|
+
TriviallyTrueAssertion.id: TriviallyTrueAssertion,
|
|
185
|
+
ConditionalAssertionInTest.id: ConditionalAssertionInTest,
|
|
186
|
+
DuplicateTestBody.id: DuplicateTestBody,
|
|
187
|
+
UnusedMockSetup.id: UnusedMockSetup,
|
|
188
|
+
PreferFstringOverConcat.id: PreferFstringOverConcat,
|
|
189
|
+
PreferMatchPatternDestructuring.id: PreferMatchPatternDestructuring,
|
|
190
|
+
PreferOrPattern.id: PreferOrPattern,
|
|
191
|
+
RequirePortForService.id: RequirePortForService,
|
|
192
|
+
PreferNonNullableCollection.id: PreferNonNullableCollection,
|
|
154
193
|
}
|
|
155
194
|
|
|
156
195
|
__all__ = ["REGISTRY"]
|