codelaw-rules-python 0.2.0__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.
Files changed (139) hide show
  1. codelaw_rules_python/LICENSE +23 -0
  2. codelaw_rules_python/NOTICE +14 -0
  3. codelaw_rules_python/README.md +189 -0
  4. codelaw_rules_python/codelaw-pack.toml +6 -0
  5. codelaw_rules_python/corpus.toml +103 -0
  6. codelaw_rules_python/data/python/stdlib.json +331 -0
  7. codelaw_rules_python/presets/py/conventions.toml +5 -0
  8. codelaw_rules_python/presets/py/project.toml +4 -0
  9. codelaw_rules_python/presets/py/recommended.toml +99 -0
  10. codelaw_rules_python/rules/graph/no-unused-exports.md +69 -0
  11. codelaw_rules_python/rules/py/abstract-base-class-without-abstract-method.md +50 -0
  12. codelaw_rules_python/rules/py/all-sorted.cases.md +74 -0
  13. codelaw_rules_python/rules/py/all-sorted.md +33 -0
  14. codelaw_rules_python/rules/py/ambiguous-class-name.md +41 -0
  15. codelaw_rules_python/rules/py/ambiguous-function-name.md +41 -0
  16. codelaw_rules_python/rules/py/ambiguous-variable-name.cases.md +47 -0
  17. codelaw_rules_python/rules/py/ambiguous-variable-name.md +39 -0
  18. codelaw_rules_python/rules/py/assert-false.md +34 -0
  19. codelaw_rules_python/rules/py/assert-raises-exception.md +51 -0
  20. codelaw_rules_python/rules/py/assert-tuple.md +38 -0
  21. codelaw_rules_python/rules/py/assignment-to-os-environ.md +43 -0
  22. codelaw_rules_python/rules/py/batched-without-explicit-strict.md +52 -0
  23. codelaw_rules_python/rules/py/break-outside-loop.md +41 -0
  24. codelaw_rules_python/rules/py/cached-instance-method.md +55 -0
  25. codelaw_rules_python/rules/py/continue-outside-loop.md +41 -0
  26. codelaw_rules_python/rules/py/default-except-not-last.md +48 -0
  27. codelaw_rules_python/rules/py/duplicate-dict-key-variable.md +39 -0
  28. codelaw_rules_python/rules/py/duplicate-dict-key.md +39 -0
  29. codelaw_rules_python/rules/py/duplicate-handler-exception.md +43 -0
  30. codelaw_rules_python/rules/py/duplicate-set-value.md +33 -0
  31. codelaw_rules_python/rules/py/duplicate-try-block-exception.md +47 -0
  32. codelaw_rules_python/rules/py/empty-method-without-abstract-decorator.md +55 -0
  33. codelaw_rules_python/rules/py/except-with-empty-tuple.md +44 -0
  34. codelaw_rules_python/rules/py/except-with-non-exception-classes.md +44 -0
  35. codelaw_rules_python/rules/py/f-string-docstring.md +40 -0
  36. codelaw_rules_python/rules/py/f-string-missing-placeholders.cases.md +49 -0
  37. codelaw_rules_python/rules/py/f-string-missing-placeholders.md +33 -0
  38. codelaw_rules_python/rules/py/format-invalid.md +38 -0
  39. codelaw_rules_python/rules/py/format-missing-argument.md +38 -0
  40. codelaw_rules_python/rules/py/format-mixed-numbering.md +38 -0
  41. codelaw_rules_python/rules/py/format-unused-named-argument.md +37 -0
  42. codelaw_rules_python/rules/py/format-unused-positional-argument.md +37 -0
  43. codelaw_rules_python/rules/py/forward-annotation-syntax-error.md +44 -0
  44. codelaw_rules_python/rules/py/function-call-in-default-argument.md +51 -0
  45. codelaw_rules_python/rules/py/function-uses-loop-variable.cases.md +57 -0
  46. codelaw_rules_python/rules/py/function-uses-loop-variable.md +42 -0
  47. codelaw_rules_python/rules/py/getattr-with-constant.cases.md +31 -0
  48. codelaw_rules_python/rules/py/getattr-with-constant.md +33 -0
  49. codelaw_rules_python/rules/py/if-tuple.md +40 -0
  50. codelaw_rules_python/rules/py/import-shadowed-by-loop-var.md +45 -0
  51. codelaw_rules_python/rules/py/invalid-print-syntax.md +42 -0
  52. codelaw_rules_python/rules/py/is-literal.md +36 -0
  53. codelaw_rules_python/rules/py/jump-statement-in-finally.cases.md +15 -0
  54. codelaw_rules_python/rules/py/jump-statement-in-finally.md +47 -0
  55. codelaw_rules_python/rules/py/lambda-assignment.cases.md +48 -0
  56. codelaw_rules_python/rules/py/lambda-assignment.md +35 -0
  57. codelaw_rules_python/rules/py/late-future-import.md +40 -0
  58. codelaw_rules_python/rules/py/loop-variable-overrides-iterator.md +41 -0
  59. codelaw_rules_python/rules/py/map-without-explicit-strict.md +46 -0
  60. codelaw_rules_python/rules/py/module-import-not-at-top.cases.md +64 -0
  61. codelaw_rules_python/rules/py/module-import-not-at-top.md +46 -0
  62. codelaw_rules_python/rules/py/multiple-imports-on-one-line.md +38 -0
  63. codelaw_rules_python/rules/py/multiple-starred-expressions.md +38 -0
  64. codelaw_rules_python/rules/py/mutable-contextvar-default.md +42 -0
  65. codelaw_rules_python/rules/py/nested-star-import.md +42 -0
  66. codelaw_rules_python/rules/py/no-bare-except.cases.md +37 -0
  67. codelaw_rules_python/rules/py/no-bare-except.md +44 -0
  68. codelaw_rules_python/rules/py/no-explicit-stacklevel.md +38 -0
  69. codelaw_rules_python/rules/py/no-mutable-default.cases.md +58 -0
  70. codelaw_rules_python/rules/py/no-mutable-default.md +44 -0
  71. codelaw_rules_python/rules/py/no-print.cases.md +40 -0
  72. codelaw_rules_python/rules/py/no-print.md +42 -0
  73. codelaw_rules_python/rules/py/no-star-import.cases.md +11 -0
  74. codelaw_rules_python/rules/py/no-star-import.md +47 -0
  75. codelaw_rules_python/rules/py/no-tunable-literals.cases.md +54 -0
  76. codelaw_rules_python/rules/py/no-tunable-literals.md +58 -0
  77. codelaw_rules_python/rules/py/none-comparison.md +36 -0
  78. codelaw_rules_python/rules/py/not-in-test.md +35 -0
  79. codelaw_rules_python/rules/py/not-is-test.md +35 -0
  80. codelaw_rules_python/rules/py/percent-format-count-mismatch.md +38 -0
  81. codelaw_rules_python/rules/py/percent-format-expected-mapping.md +38 -0
  82. codelaw_rules_python/rules/py/percent-format-expected-sequence.md +38 -0
  83. codelaw_rules_python/rules/py/percent-format-invalid.md +38 -0
  84. codelaw_rules_python/rules/py/percent-format-missing-argument.md +38 -0
  85. codelaw_rules_python/rules/py/percent-format-mixed-placeholders.md +38 -0
  86. codelaw_rules_python/rules/py/percent-format-star-requires-sequence.md +38 -0
  87. codelaw_rules_python/rules/py/percent-format-unsupported-character.md +38 -0
  88. codelaw_rules_python/rules/py/percent-format-unused-named-argument.md +37 -0
  89. codelaw_rules_python/rules/py/raise-literal.md +38 -0
  90. codelaw_rules_python/rules/py/raise-not-implemented.md +38 -0
  91. codelaw_rules_python/rules/py/raise-without-from-inside-except.cases.md +46 -0
  92. codelaw_rules_python/rules/py/raise-without-from-inside-except.md +45 -0
  93. codelaw_rules_python/rules/py/re-sub-positional-args.md +42 -0
  94. codelaw_rules_python/rules/py/redefined-while-unused.cases.md +186 -0
  95. codelaw_rules_python/rules/py/redefined-while-unused.md +53 -0
  96. codelaw_rules_python/rules/py/redundant-tuple-in-exception-handler.md +39 -0
  97. codelaw_rules_python/rules/py/return-outside-function.md +41 -0
  98. codelaw_rules_python/rules/py/reuse-of-groupby-generator.cases.md +40 -0
  99. codelaw_rules_python/rules/py/reuse-of-groupby-generator.md +46 -0
  100. codelaw_rules_python/rules/py/setattr-with-constant.md +33 -0
  101. codelaw_rules_python/rules/py/star-arg-unpacking-after-keyword-arg.md +38 -0
  102. codelaw_rules_python/rules/py/star-import-usage.cases.md +35 -0
  103. codelaw_rules_python/rules/py/star-import-usage.md +43 -0
  104. codelaw_rules_python/rules/py/static-key-dict-comprehension.md +38 -0
  105. codelaw_rules_python/rules/py/strip-with-multi-characters.md +39 -0
  106. codelaw_rules_python/rules/py/too-many-expressions-in-star-assignment.md +38 -0
  107. codelaw_rules_python/rules/py/true-false-comparison.cases.md +33 -0
  108. codelaw_rules_python/rules/py/true-false-comparison.md +36 -0
  109. codelaw_rules_python/rules/py/type-comparison.md +41 -0
  110. codelaw_rules_python/rules/py/unary-prefix-increment.md +40 -0
  111. codelaw_rules_python/rules/py/undefined-export.md +55 -0
  112. codelaw_rules_python/rules/py/undefined-future-feature.md +39 -0
  113. codelaw_rules_python/rules/py/undefined-local.cases.md +80 -0
  114. codelaw_rules_python/rules/py/undefined-local.md +48 -0
  115. codelaw_rules_python/rules/py/undefined-name.cases.md +132 -0
  116. codelaw_rules_python/rules/py/undefined-name.md +42 -0
  117. codelaw_rules_python/rules/py/unintentional-type-annotation.cases.md +13 -0
  118. codelaw_rules_python/rules/py/unintentional-type-annotation.md +38 -0
  119. codelaw_rules_python/rules/py/unreliable-callable-check.md +36 -0
  120. codelaw_rules_python/rules/py/unsorted-imports.cases.md +159 -0
  121. codelaw_rules_python/rules/py/unsorted-imports.md +60 -0
  122. codelaw_rules_python/rules/py/unused-annotation.md +36 -0
  123. codelaw_rules_python/rules/py/unused-import.cases.md +289 -0
  124. codelaw_rules_python/rules/py/unused-import.md +45 -0
  125. codelaw_rules_python/rules/py/unused-loop-control-variable.cases.md +30 -0
  126. codelaw_rules_python/rules/py/unused-loop-control-variable.md +36 -0
  127. codelaw_rules_python/rules/py/unused-variable.cases.md +169 -0
  128. codelaw_rules_python/rules/py/unused-variable.md +38 -0
  129. codelaw_rules_python/rules/py/useless-comparison.md +41 -0
  130. codelaw_rules_python/rules/py/useless-contextlib-suppress.md +44 -0
  131. codelaw_rules_python/rules/py/useless-expression.cases.md +57 -0
  132. codelaw_rules_python/rules/py/useless-expression.md +45 -0
  133. codelaw_rules_python/rules/py/yield-outside-function.md +44 -0
  134. codelaw_rules_python/rules/py/zip-without-explicit-strict.cases.md +26 -0
  135. codelaw_rules_python/rules/py/zip-without-explicit-strict.md +46 -0
  136. codelaw_rules_python-0.2.0.dist-info/METADATA +199 -0
  137. codelaw_rules_python-0.2.0.dist-info/RECORD +139 -0
  138. codelaw_rules_python-0.2.0.dist-info/WHEEL +4 -0
  139. codelaw_rules_python-0.2.0.dist-info/licenses/LICENSE +23 -0
@@ -0,0 +1,57 @@
1
+ # py/useless-expression — cases
2
+
3
+ ### case: arithmetic on literals
4
+
5
+ ```py
6
+ def f():
7
+ 1 / 0
8
+ ```
9
+
10
+ ```expect
11
+ 2:5 py/useless-expression
12
+ ```
13
+
14
+ ### case: docstrings and ellipsis
15
+
16
+ ```py
17
+ def f():
18
+ """Doc."""
19
+ ...
20
+ ```
21
+
22
+ ```expect
23
+ (none)
24
+ ```
25
+
26
+ ### case: calls have effects
27
+
28
+ ```py
29
+ def f(a):
30
+ a.b()
31
+ ```
32
+
33
+ ```expect
34
+ (none)
35
+ ```
36
+
37
+ ### case: a bare name
38
+
39
+ ```py
40
+ def f(a):
41
+ a
42
+ ```
43
+
44
+ ```expect
45
+ 2:5 py/useless-expression
46
+ ```
47
+
48
+ ### case: a tuple of attributes
49
+
50
+ ```py
51
+ import termios
52
+ termios.tcgetattr, termios.tcsetattr
53
+ ```
54
+
55
+ ```expect
56
+ 2:1 py/useless-expression
57
+ ```
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: py/useless-expression
3
+ title: "No expression statement that does nothing"
4
+ languages: [python]
5
+ fix: manual
6
+ fix_reason: "what the expression was meant for needs a person"
7
+ stability: preview
8
+ ported_from: [ruff/B018]
9
+ since: 0.1.0
10
+ ---
11
+
12
+ A statement isn't a bare name, number, attribute access or container literal whose value is thrown away.
13
+
14
+ **Why:** It has no effect; usually something was meant to be returned, assigned or called.
15
+
16
+ ```codelaw
17
+ native: py/useless-expression
18
+ ```
19
+
20
+ ## How to fix
21
+
22
+ 1. Return, assign or call the value as intended, or remove the line.
23
+
24
+ ## Examples
25
+
26
+ ### Python
27
+
28
+ #### Don't
29
+
30
+ ```py
31
+ def name(user):
32
+ user.name
33
+ return user
34
+ ```
35
+
36
+ #### Do
37
+
38
+ ```py
39
+ def name(user):
40
+ return user.name
41
+ ```
42
+
43
+ ## Differences from the source
44
+
45
+ Attribute access is reported only on plain `a.b.c` chains; Ruff also reports `f().attr`.
@@ -0,0 +1,44 @@
1
+ ---
2
+ id: py/yield-outside-function
3
+ title: "`yield` and `await` only inside a function"
4
+ languages: [python]
5
+ fix: manual
6
+ fix_reason: "the code has to be moved into a function, which changes its structure"
7
+ stability: preview
8
+ ported_from: [ruff/F704]
9
+ since: 0.1.0
10
+ ---
11
+
12
+ `yield`, `yield from` and `await` appear only inside a function, never at module or class level.
13
+
14
+ **Why:** Outside a function they are a `SyntaxError`.
15
+
16
+ ```codelaw
17
+ native: py/yield-outside-function
18
+ ```
19
+
20
+ ## How to fix
21
+
22
+ 1. Move the code into a function (a generator, or an `async def` for `await`).
23
+
24
+ ## Examples
25
+
26
+ ### Python
27
+
28
+ #### Don't
29
+
30
+ ```py
31
+ class Numbers:
32
+ yield 1
33
+ ```
34
+
35
+ #### Do
36
+
37
+ ```py
38
+ def numbers():
39
+ yield 1
40
+ ```
41
+
42
+ ## Differences from the source
43
+
44
+ Ruff allows a top-level `await` in notebooks; codelaw doesn't lint notebooks.
@@ -0,0 +1,26 @@
1
+ # py/zip-without-explicit-strict — cases
2
+
3
+ ### case: infinite iterator
4
+
5
+ ```py
6
+ import itertools
7
+ pairs = zip(names, itertools.count())
8
+ ```
9
+
10
+ ```expect
11
+ (none)
12
+ ```
13
+
14
+ ### case: starred arguments
15
+
16
+ ```py
17
+ rows = zip(*columns)
18
+ ```
19
+
20
+ ```expect
21
+ 1:8 py/zip-without-explicit-strict
22
+ ```
23
+
24
+ ```fixed
25
+ rows = zip(*columns, strict=False)
26
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ id: py/zip-without-explicit-strict
3
+ title: "`zip()` says `strict=`"
4
+ languages: [python]
5
+ fix: suggest
6
+ fix_reason: "`strict=` exists only from Python 3.10, and codelaw cannot tell which Python the code runs on: on an older one the added keyword raises `TypeError`"
7
+ stability: preview
8
+ options:
9
+ target_version: { type: string, description: "the oldest Python the code supports, e.g. \"3.9\"; below 3.10 the rule is off" }
10
+ ported_from: [ruff/B905]
11
+ since: 0.1.0
12
+ ---
13
+
14
+ `zip()` is called with `strict=True` or `strict=False`.
15
+
16
+ **Why:** Without it, `zip` silently stops at the shortest input, hiding inputs of different lengths. The keyword exists from Python 3.10.
17
+
18
+ ```codelaw
19
+ native: py/zip-without-explicit-strict
20
+ ```
21
+
22
+ ## Examples
23
+
24
+ ### Python
25
+
26
+ #### Don't
27
+
28
+ ```py
29
+ pairs = zip(names, ages)
30
+ ```
31
+
32
+ #### Do
33
+
34
+ ```py
35
+ pairs = zip(names, ages, strict=True)
36
+ ```
37
+
38
+ #### Fixed
39
+
40
+ ```py
41
+ pairs = zip(names, ages, strict=False)
42
+ ```
43
+
44
+ ## Differences from the source
45
+
46
+ The fix adds `strict=False`, which keeps today's behaviour; set `strict=True` where the inputs must match. Ruff reads the target version from its own settings; here it is the `target_version` option, and the rule runs when it is unset. Because it may be unset, the fix is `suggest` (`codelaw fix --unsafe`), not `auto`: on Python before 3.10 the keyword raises `TypeError`.
@@ -0,0 +1,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: codelaw-rules-python
3
+ Version: 0.2.0
4
+ Summary: codelaw's rules for Python; PyPI only (SR-RULE-PACKS)
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Project-URL: Repository, https://github.com/arpitarya/codelaw
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+
11
+ # codelaw-rules-python
12
+
13
+ codelaw's rules for Python — one of the first-party rule packs
14
+ ([SR-RULE-PACKS](../../records/0101_rule-packs.md)). It ships on
15
+ PyPI only, as `codelaw-rules-python`; npm has no copy (L6 decision 11).
16
+
17
+ ```toml
18
+ # codelaw.toml
19
+ extends = ["codelaw:py/recommended"]
20
+ preview = true # every rule is `preview` until a corpus run promotes it
21
+ ```
22
+
23
+ ## Presets
24
+
25
+ <!-- docs-sync:presets -->
26
+
27
+ | preset | rules | ported from |
28
+ |---|---|---|
29
+ | `py/recommended` | 96 | Ruff 0.17.1: its long-standing default `E4`, `E7`, `E9`, `F` (55 of 59 rules; the other four are below), all 39 stable flake8-bugbear `B` rules, isort's `I001` and `RUF022` |
30
+ | `py/conventions` | 2 | opt-in house conventions from the starter catalogue: `py/no-print`, `py/no-tunable-literals` |
31
+ | `py/project` | 1 | `graph/no-unused-exports`, the rule that reads the whole repo, from vulture's unused-function check — opt in |
32
+
33
+ <!-- /docs-sync:presets -->
34
+
35
+ The starter catalogue's other Python rules match a Ruff rule, so they sit in
36
+ `py/recommended` under their starter ids: `py/no-bare-except` (`E722`),
37
+ `py/no-mutable-default` (`B006`) and `py/all-sorted` (`RUF022`).
38
+
39
+ Every rule is **reimplemented**, not vendored: the matchers, messages and docs
40
+ are written fresh from Ruff's documented behaviour, and each rule's
41
+ `ported_from:` names the source rule. 97 rules are `native:` (Rust, in
42
+ `crates/codelaw-native/src/python_*.rs`); `py/no-tunable-literals` is a
43
+ `match:` rule.
44
+
45
+ ## Ported
46
+
47
+ | Ruff | rule | fix |
48
+ |---|---|---|
49
+ | `E401` | `py/multiple-imports-on-one-line` | auto |
50
+ | `E402` | `py/module-import-not-at-top` | manual |
51
+ | `E711` | `py/none-comparison` | suggest |
52
+ | `E712` | `py/true-false-comparison` | suggest |
53
+ | `E713` | `py/not-in-test` | auto |
54
+ | `E714` | `py/not-is-test` | auto |
55
+ | `E721` | `py/type-comparison` | manual |
56
+ | `E722` | `py/no-bare-except` | suggest |
57
+ | `E731` | `py/lambda-assignment` | suggest |
58
+ | `E741` | `py/ambiguous-variable-name` | manual |
59
+ | `E742` | `py/ambiguous-class-name` | manual |
60
+ | `E743` | `py/ambiguous-function-name` | manual |
61
+ | `F401` | `py/unused-import` | suggest |
62
+ | `F402` | `py/import-shadowed-by-loop-var` | manual |
63
+ | `F403` | `py/no-star-import` | manual |
64
+ | `F404` | `py/late-future-import` | manual |
65
+ | `F405` | `py/star-import-usage` | manual |
66
+ | `F406` | `py/nested-star-import` | manual |
67
+ | `F407` | `py/undefined-future-feature` | manual |
68
+ | `F501` | `py/percent-format-invalid` | manual |
69
+ | `F502` | `py/percent-format-expected-mapping` | manual |
70
+ | `F503` | `py/percent-format-expected-sequence` | manual |
71
+ | `F504` | `py/percent-format-unused-named-argument` | auto |
72
+ | `F505` | `py/percent-format-missing-argument` | manual |
73
+ | `F506` | `py/percent-format-mixed-placeholders` | manual |
74
+ | `F507` | `py/percent-format-count-mismatch` | manual |
75
+ | `F508` | `py/percent-format-star-requires-sequence` | manual |
76
+ | `F509` | `py/percent-format-unsupported-character` | manual |
77
+ | `F521` | `py/format-invalid` | manual |
78
+ | `F522` | `py/format-unused-named-argument` | auto |
79
+ | `F523` | `py/format-unused-positional-argument` | auto |
80
+ | `F524` | `py/format-missing-argument` | manual |
81
+ | `F525` | `py/format-mixed-numbering` | manual |
82
+ | `F541` | `py/f-string-missing-placeholders` | auto |
83
+ | `F601` | `py/duplicate-dict-key` | manual |
84
+ | `F602` | `py/duplicate-dict-key-variable` | manual |
85
+ | `F621` | `py/too-many-expressions-in-star-assignment` | manual |
86
+ | `F622` | `py/multiple-starred-expressions` | manual |
87
+ | `F631` | `py/assert-tuple` | manual |
88
+ | `F632` | `py/is-literal` | suggest |
89
+ | `F633` | `py/invalid-print-syntax` | manual |
90
+ | `F634` | `py/if-tuple` | manual |
91
+ | `F701` | `py/break-outside-loop` | manual |
92
+ | `F702` | `py/continue-outside-loop` | manual |
93
+ | `F704` | `py/yield-outside-function` | manual |
94
+ | `F706` | `py/return-outside-function` | manual |
95
+ | `F707` | `py/default-except-not-last` | manual |
96
+ | `F722` | `py/forward-annotation-syntax-error` | manual |
97
+ | `F811` | `py/redefined-while-unused` | manual |
98
+ | `F821` | `py/undefined-name` | manual |
99
+ | `F822` | `py/undefined-export` | manual |
100
+ | `F823` | `py/undefined-local` | manual |
101
+ | `F841` | `py/unused-variable` | suggest |
102
+ | `F842` | `py/unused-annotation` | auto |
103
+ | `F901` | `py/raise-not-implemented` | suggest |
104
+ | `B002` | `py/unary-prefix-increment` | manual |
105
+ | `B003` | `py/assignment-to-os-environ` | manual |
106
+ | `B004` | `py/unreliable-callable-check` | suggest |
107
+ | `B005` | `py/strip-with-multi-characters` | manual |
108
+ | `B006` | `py/no-mutable-default` | suggest |
109
+ | `B007` | `py/unused-loop-control-variable` | suggest |
110
+ | `B008` | `py/function-call-in-default-argument` | manual |
111
+ | `B009` | `py/getattr-with-constant` | auto |
112
+ | `B010` | `py/setattr-with-constant` | auto |
113
+ | `B011` | `py/assert-false` | suggest |
114
+ | `B012` | `py/jump-statement-in-finally` | manual |
115
+ | `B013` | `py/redundant-tuple-in-exception-handler` | auto |
116
+ | `B014` | `py/duplicate-handler-exception` | auto |
117
+ | `B015` | `py/useless-comparison` | manual |
118
+ | `B016` | `py/raise-literal` | manual |
119
+ | `B017` | `py/assert-raises-exception` | manual |
120
+ | `B018` | `py/useless-expression` | manual |
121
+ | `B019` | `py/cached-instance-method` | manual |
122
+ | `B020` | `py/loop-variable-overrides-iterator` | manual |
123
+ | `B021` | `py/f-string-docstring` | manual |
124
+ | `B022` | `py/useless-contextlib-suppress` | manual |
125
+ | `B023` | `py/function-uses-loop-variable` | manual |
126
+ | `B024` | `py/abstract-base-class-without-abstract-method` | manual |
127
+ | `B025` | `py/duplicate-try-block-exception` | manual |
128
+ | `B026` | `py/star-arg-unpacking-after-keyword-arg` | manual |
129
+ | `B027` | `py/empty-method-without-abstract-decorator` | manual |
130
+ | `B028` | `py/no-explicit-stacklevel` | suggest |
131
+ | `B029` | `py/except-with-empty-tuple` | manual |
132
+ | `B030` | `py/except-with-non-exception-classes` | manual |
133
+ | `B031` | `py/reuse-of-groupby-generator` | manual |
134
+ | `B032` | `py/unintentional-type-annotation` | manual |
135
+ | `B033` | `py/duplicate-set-value` | auto |
136
+ | `B034` | `py/re-sub-positional-args` | manual |
137
+ | `B035` | `py/static-key-dict-comprehension` | manual |
138
+ | `B039` | `py/mutable-contextvar-default` | manual |
139
+ | `B904` | `py/raise-without-from-inside-except` | manual |
140
+ | `B905` | `py/zip-without-explicit-strict` | suggest |
141
+ | `B911` | `py/batched-without-explicit-strict` | suggest |
142
+ | `B912` | `py/map-without-explicit-strict` | suggest |
143
+ | `I001` | `py/unsorted-imports` | auto |
144
+ | `RUF022` | `py/all-sorted` | auto |
145
+
146
+ ## How the ports differ
147
+
148
+ Every rule matches Ruff's documented behaviour on Ruff's own examples. Where
149
+ codelaw differs, the rule's `## Differences from the source` section says so.
150
+ The ones that shape results most:
151
+
152
+ | area | difference |
153
+ |---|---|
154
+ | name resolution | The semantic model is per scope, not per statement: a name bound anywhere in a scope counts as bound everywhere in it, and `del` is not tracked. Ruff follows the order statements run in, so it reports a few more `F821`, `F405`, `F811` and `F401` findings in code that rebinds names conditionally. |
155
+ | `py/redefined-while-unused` | A read anywhere between two definitions counts as a use, even inside a function body that only runs later, and so does a mention in a string annotation; as in Ruff, a redefinition in a different branch (`if __name__ == "__main__":`) is not reported; a parameter shadowing a module-level import is not reported. |
156
+ | `py/unused-import` | Names in string annotations, and in strings inside typing generics (`Dict["Name", int]`), `cast()` and `TypeVar(bound=)`, count as uses; `# type:` comments don't, as in Ruff 0.17. Not reported for imports in a class body, `import a.b` loading a submodule of a package also imported under an alias, or importing `__all__` (Ruff reports that one). Imports inside a `try` body are reported without an edit. The fix is `suggest`, because an import can run code. |
157
+ | `py/unused-variable` | As in Ruff, unpacking is reported only from a tuple or list literal. Outside functions only an unused `except … as name` is reported. |
158
+ | `py/unsorted-imports` | Checks order only. Blank lines after the import block and line wrapping are the formatter's; `from m import a, b as c` and `import a, b` are not reported for their shape. First-party modules come from the `known_first_party` option. |
159
+ | `py/no-star-import` | Relative star imports (`from .sub import *`) are not reported: that is how a package re-exports its submodules. |
160
+ | `py/zip-without-explicit-strict`, `py/batched-without-explicit-strict`, `py/map-without-explicit-strict` | The Python version comes from each rule's `target_version` option, not a project setting; unset, the rules run. The fix adds `strict=False`, which keeps today's behaviour (Ruff has no fix for `B911`); it is `suggest`, not `auto`, because with the version unknown the keyword may not exist and would raise `TypeError` (W-17). |
161
+ | `py/no-mutable-default` | The fix is offered for unannotated parameters whose default doesn't read the parameter's own name. |
162
+ | `# noqa` | Ruff's suppression comments are not read; codelaw has its own. |
163
+
164
+ ## Not ported, and why
165
+
166
+ | rule | why |
167
+ |---|---|
168
+ | pycodestyle `E1`, `E2`, `E3`, `E5`, `W` | never: layout, which the formatter owns |
169
+ | `E701`, `E702`, `E703` | never: layout (statements per line, semicolons) |
170
+ | `E902` io-error | the engine reports files it can't read (`codelaw/not-utf8`, `codelaw/internal-error`) |
171
+ | `E999` syntax-error | removed upstream in Ruff 0.8.0 |
172
+ | `B043`, `B901`, `B903`, `B909` | preview-only in Ruff 0.17.1, not part of its stable `B` set |
173
+ | flake8-bugbear `B950` | never: line length is layout, and Ruff doesn't implement it |
174
+ | `I002` missing-required-import | needs the project's list of required imports; not part of `I001` |
175
+
176
+ The rest of Ruff 0.16's wider default (`UP`, `SIM`, `PL`, `C4`, …) is planned
177
+ for a later `py/strict` preset ([W-03](../../work/open/W-03-rule-packs.md)).
178
+
179
+ ## Data
180
+
181
+ `data/python/stdlib.json` — the standard library's top-level module names, the
182
+ union of CPython 3.10–3.14's `sys.stdlib_module_names`, so modules removed in
183
+ recent versions (`distutils`, `asynchat`, `imp`, …) still count as standard
184
+ library. `py/unsorted-imports` uses it to place imports in sections. See
185
+ `NOTICE`.
186
+
187
+ ## Corpus check
188
+
189
+ Each run checks every rule and compares it line by line with Ruff 0.17.1
190
+ running the same rules (`--select E4,E7,E9,F,B,I001,RUF022`).
191
+
192
+ | corpus | files | findings | rules where codelaw and Ruff differ, and why |
193
+ |---|---|---|---|
194
+ | CPython 3.9 standard library (`lib/python3.9`, no tests) | 420 | 1,526 | I001 (blank lines after imports, left to the formatter), F821/F405/F811/F401/F841 (Ruff follows statement order and `del`; codelaw doesn't report `from io import __all__`), F401/I001 `# noqa` lines, B028 (a `warnings` name with a `None` fallback), B012 (codelaw reports every `return` in a `finally`), B024 (`class ABC` inside `abc.py`), B912 (`target_version` unset) |
195
+ | pip 21.2.4 `pip/_internal` | 141 | 310 | F401: 12 lines, every one marked `# noqa`; B912 (`target_version` unset) |
196
+ | rich 15.0.0 (fully annotated) | 100 | 98 | I001: 5 blocks missing only a blank line between sections; F401 and B007: one `# noqa` line each |
197
+
198
+ Applying every `auto` and `suggest` fix to all three corpora changed 368 files,
199
+ broke none, and left no fixable finding behind.
@@ -0,0 +1,139 @@
1
+ codelaw_rules_python/LICENSE,sha256=_R8NFLyGiKUo7mPzbUGbqg3hdEKYhaTsIgBGXqtFfa8,1097
2
+ codelaw_rules_python/NOTICE,sha256=4EUhMgqy2NLEUkuaQE7sPKdB5epV6UznSiaXVHTYDys,775
3
+ codelaw_rules_python/README.md,sha256=T14sqUwUw7h7uT9hlys23Pnud-9Ki7ANedHrHQ5RMAQ,11267
4
+ codelaw_rules_python/codelaw-pack.toml,sha256=K6g5bwmq9j5zm8XQ4ZffM4Z58Bxfw1vhb6a57yiGHXA,224
5
+ codelaw_rules_python/corpus.toml,sha256=AOCVllkFh9TrpBTkMtzXCVT9VhbV7V7YdhbxwlvP6WU,3439
6
+ codelaw_rules_python/data/python/stdlib.json,sha256=_pZRsgomoP_0rUBdW6odnOAcF2VLn1KiRcKHT0SMiS0,3778
7
+ codelaw_rules_python/presets/py/conventions.toml,sha256=YIHWHomlRnl6okoBu07EL0plUZfo6ldOVf1eXu7wg00,172
8
+ codelaw_rules_python/presets/py/project.toml,sha256=R9EDz_tl3YuoQTBHDZ9hjGOT7z_XuHYDefBYDl1mbEI,150
9
+ codelaw_rules_python/presets/py/recommended.toml,sha256=VpJn2bvblG1cAfsd8Vh2VTUCX9RtxIlhbYDWNPos1XI,3954
10
+ codelaw_rules_python/rules/graph/no-unused-exports.md,sha256=9cNUYwycsU9Gcag9zwp9MQq_ASMFZEuxqmaC-ulaS2Q,1959
11
+ codelaw_rules_python/rules/py/abstract-base-class-without-abstract-method.md,sha256=Ca2rKOkqB81VVVXEQzHSdn5kDg3rELgtKCaTbQC7pB8,973
12
+ codelaw_rules_python/rules/py/all-sorted.cases.md,sha256=q2AfJA2b0tzYRyy4Qb0OmvBWayUup2Fgzr71mRjTt6Q,739
13
+ codelaw_rules_python/rules/py/all-sorted.md,sha256=l0l2dNdA-VBgHi9s8rJwZtvDCIfsMc_tGG2mtoZn9Ls,556
14
+ codelaw_rules_python/rules/py/ambiguous-class-name.md,sha256=s2N9IdGwfiqIXLUlfD3H8THxtX1-tUdtdACxKDZFSgM,612
15
+ codelaw_rules_python/rules/py/ambiguous-function-name.md,sha256=7t-lRUoKkgIPpzjoJzzZttYwsqsqdjkEmEdnBFGmqbs,638
16
+ codelaw_rules_python/rules/py/ambiguous-variable-name.cases.md,sha256=AAZOtvcvQqaoCxlQi1gnqDnBEv9P01T2-zxN93EAUxw,549
17
+ codelaw_rules_python/rules/py/ambiguous-variable-name.md,sha256=ZPsHyEVpHnCGjXe0XobOcKIb_k-ENbha7dFwNB-8G5Y,599
18
+ codelaw_rules_python/rules/py/assert-false.md,sha256=wQ6Smlo9NTwH4LvtwNVNRHxNux5meGZJkw9xHRtd3OU,569
19
+ codelaw_rules_python/rules/py/assert-raises-exception.md,sha256=knR8tnU_8J7v6tE5cQtNRw7D3SUHlRXOBWxdaXjIc4g,1003
20
+ codelaw_rules_python/rules/py/assert-tuple.md,sha256=MMGRWgMFsAkvvVmUgO0sTikDDJQEjXuo4oyD0kBg2z4,686
21
+ codelaw_rules_python/rules/py/assignment-to-os-environ.md,sha256=UY2MG0vemoOZoe4NQnf8n1omehpJnyy5AW63U3i5bhk,819
22
+ codelaw_rules_python/rules/py/batched-without-explicit-strict.md,sha256=JWePPZLMMdC9_-6USTk4AjIhf8qmeIyFewFnOzsxydw,1269
23
+ codelaw_rules_python/rules/py/break-outside-loop.md,sha256=29jvBKuC_ADFV65F8MTB-ZtTwhGbLqnxnStcLdJMi6E,652
24
+ codelaw_rules_python/rules/py/cached-instance-method.md,sha256=RwbNbKAvPg4w7f_ObXfIf8O89DBuUkGeGDFDWXLy3gw,939
25
+ codelaw_rules_python/rules/py/continue-outside-loop.md,sha256=KTqrYSUyCo0QgRftfMEUMxWxdIbiLUYRh5kjHfSZiXc,645
26
+ codelaw_rules_python/rules/py/default-except-not-last.md,sha256=BHO9COowBEOJAFopzYOTLMr73YbI-Fr4mth4m2kioz4,705
27
+ codelaw_rules_python/rules/py/duplicate-dict-key-variable.md,sha256=SpZ-pwy0xqXoDp8-_dIGt1X9nOHqcDXN2jBBlwJKMjI,683
28
+ codelaw_rules_python/rules/py/duplicate-dict-key.md,sha256=W6CiBXPfv11Hcmn7OoT7Xg4wh-WUbjwQg-7gv_C5P8Q,669
29
+ codelaw_rules_python/rules/py/duplicate-handler-exception.md,sha256=HZBUeJ1xaLS8aIY8fXUJqacHW_scX299vbrkKtujYBc,694
30
+ codelaw_rules_python/rules/py/duplicate-set-value.md,sha256=L08W-yvUaK42ww9vlyY5cXQZ0n3EEDd_rEJ60UqeM8I,472
31
+ codelaw_rules_python/rules/py/duplicate-try-block-exception.md,sha256=msxFHZYLgcqMxx5CdmL8R3OrGGhnzlyEJEeb4_pON2M,762
32
+ codelaw_rules_python/rules/py/empty-method-without-abstract-decorator.md,sha256=ZfXVwlipSnKuniBMiUZMVCRI__VvKqJUOC51aO2c-cs,1024
33
+ codelaw_rules_python/rules/py/except-with-empty-tuple.md,sha256=0D4-2VBoChmgES77ZTM4QDFnYLdsRNq_nUfS3YfMEtc,602
34
+ codelaw_rules_python/rules/py/except-with-non-exception-classes.md,sha256=L8WJp4reufUGg626n63-K8GRBrtP9vivrkgrut0q5hI,736
35
+ codelaw_rules_python/rules/py/f-string-docstring.md,sha256=Z0ktS1AJnj3auet9RV5d36QFYO2nZRj8xE-GPyrNXYs,714
36
+ codelaw_rules_python/rules/py/f-string-missing-placeholders.cases.md,sha256=-8xuUVsTSdJchDF09aSkHXnOfV6NNoY6TgHMRejL9qg,546
37
+ codelaw_rules_python/rules/py/f-string-missing-placeholders.md,sha256=ZxvMXpsYE9TfUmFjscIAS09XDWc7lo6kcjctQfukdHs,492
38
+ codelaw_rules_python/rules/py/format-invalid.md,sha256=GCbNzfV-BYgyAO4vGav-ycUd46LxT7Ps2IyINwOL5BE,656
39
+ codelaw_rules_python/rules/py/format-missing-argument.md,sha256=qjJgNCzzfqYKMGZnvS6A2Cpg59WVu20cexHrxlY4pLY,660
40
+ codelaw_rules_python/rules/py/format-mixed-numbering.md,sha256=zAtpOAvtp7M6_KS7HiQOLhAvUAWAMAFo_0s9kJCZvu4,710
41
+ codelaw_rules_python/rules/py/format-unused-named-argument.md,sha256=cJrcKOTIngcVHkk6BvP2LDZdV2hMQrBe38pBnJjPrxc,633
42
+ codelaw_rules_python/rules/py/format-unused-positional-argument.md,sha256=AVx2f5LuOOu_i73yJMF_YTYN60r4KzkhObDsa2a3uTQ,651
43
+ codelaw_rules_python/rules/py/forward-annotation-syntax-error.md,sha256=IYML4D2HX0QU1_7i0uXwI647bJ2giehiD7Vc-BBRpbI,834
44
+ codelaw_rules_python/rules/py/function-call-in-default-argument.md,sha256=shJR6l46AtYP26xj78p3vBvS4y_1ZnePFyV1oO1t7Lo,1222
45
+ codelaw_rules_python/rules/py/function-uses-loop-variable.cases.md,sha256=TydiGr2_ZFXxpgj2CW7B7z97o0wwG-iX5BANQrhf9x8,717
46
+ codelaw_rules_python/rules/py/function-uses-loop-variable.md,sha256=CG0RokSsbRlwNXWGwW3-8GjoIQgtOz0nucsgGdxe-Fo,939
47
+ codelaw_rules_python/rules/py/getattr-with-constant.cases.md,sha256=ZXfFauYrKHcGd_eEFYsuEUezSLtSV7cexswh0XiMgko,326
48
+ codelaw_rules_python/rules/py/getattr-with-constant.md,sha256=B_ByIlzQpGXqd17VAVumYPyfjjdZoKukd0XPu3Idz3Q,512
49
+ codelaw_rules_python/rules/py/if-tuple.md,sha256=TL2GZv9iAon6uW5Nis4tZMI8WEqmy5GtMgwCXgcWriQ,589
50
+ codelaw_rules_python/rules/py/import-shadowed-by-loop-var.md,sha256=21Fj3GPo8KMH_oxTF-_c1jRN2LQqbx4-WEeHmqIb5TQ,809
51
+ codelaw_rules_python/rules/py/invalid-print-syntax.md,sha256=ODnU1lGgmrf-YjhK3MKO9KGOvxnL0nG9Y0QiGQSNN34,662
52
+ codelaw_rules_python/rules/py/is-literal.md,sha256=umd_Qv37kdb-RXAhNAWH7WqfdHVgIM6au_Ma91iADf8,640
53
+ codelaw_rules_python/rules/py/jump-statement-in-finally.cases.md,sha256=XL0QRGTGd4QweBPYFFU35zYa8tbs0oGE0i9c6spyVwY,173
54
+ codelaw_rules_python/rules/py/jump-statement-in-finally.md,sha256=n6zee7KbKa_XhpwrlEmbaaORWLr_xiWXODUN27F_V3g,854
55
+ codelaw_rules_python/rules/py/lambda-assignment.cases.md,sha256=cJ0lxT-Ovca3FAtTvliIdYNWYw6p0K-qTWYp85xCmfE,482
56
+ codelaw_rules_python/rules/py/lambda-assignment.md,sha256=SLXdkR6fB31WMkK09DZi5yhLWYdQp9UnI-Kn37Elnp4,589
57
+ codelaw_rules_python/rules/py/late-future-import.md,sha256=hKK4w0of5PTFzxqEXJNUweFLDiuQu3sNxwc4DxzjRE4,716
58
+ codelaw_rules_python/rules/py/loop-variable-overrides-iterator.md,sha256=OEBrVBtkV_-j0IpjrGOinKu8VeZAYpY0iiX8DiEQS3s,715
59
+ codelaw_rules_python/rules/py/map-without-explicit-strict.md,sha256=24SaLpgp6m1UaHWeIewnjrAIxWvcgF0wtEZ5zsLzyEw,1098
60
+ codelaw_rules_python/rules/py/module-import-not-at-top.cases.md,sha256=CDGeaDy1BVIJU_OHCxwNYRtXt_lNXltJ8cIDp9hM2Lg,659
61
+ codelaw_rules_python/rules/py/module-import-not-at-top.md,sha256=KwJXPNAeKs7tpXAUM8kmv32H0o9f5AssDhmo01wKsUI,966
62
+ codelaw_rules_python/rules/py/multiple-imports-on-one-line.md,sha256=HHdhZordGo8RTOjC_auRPgS-1TBmKeggGj-D2_t-R8E,637
63
+ codelaw_rules_python/rules/py/multiple-starred-expressions.md,sha256=inrlmBVbEQl3-tkgk7Mnrgy4vdvrPQgXjOzj93AnL34,586
64
+ codelaw_rules_python/rules/py/mutable-contextvar-default.md,sha256=G6zdOYEMh073Ca9d5dJCiqrGt6BB3iIG8gGNFk80CAY,823
65
+ codelaw_rules_python/rules/py/nested-star-import.md,sha256=VEewWlC-MPJwGPYysnsiH8mlI-OqfC2oIqQYq6Z2g7U,704
66
+ codelaw_rules_python/rules/py/no-bare-except.cases.md,sha256=bIOn9KLlViZpYEsEmyA8_TzjUbze122QJb5_2u4bkqY,371
67
+ codelaw_rules_python/rules/py/no-bare-except.md,sha256=D1Iu_g1MRGI7acQDbiTFz91iOgclQz56X2MfKOtW8Ok,744
68
+ codelaw_rules_python/rules/py/no-explicit-stacklevel.md,sha256=rh9JFP3zh8UNi1coEUMmxuVXABgLYp7HVUR5GQ8kMgM,696
69
+ codelaw_rules_python/rules/py/no-mutable-default.cases.md,sha256=CaJW3tEf4DfjmT2GuaO0PJK0YUMYBmAvf2f3NQy5Rgs,736
70
+ codelaw_rules_python/rules/py/no-mutable-default.md,sha256=mlAQuVPctG9o8HNwKfzPmybVrFsolkyhr5awEdNMdb8,959
71
+ codelaw_rules_python/rules/py/no-print.cases.md,sha256=2V0Zjyi0-MZK3IKsmOO3XjiZ6e039Zc-pktITgvTVGQ,400
72
+ codelaw_rules_python/rules/py/no-print.md,sha256=HU6_2tsB59TawvjuZvgxqBs-xw8Bv9XJMjS7AdtdvjE,694
73
+ codelaw_rules_python/rules/py/no-star-import.cases.md,sha256=wCcqWf5bX0Mve-rHeQASJt4YQ417Lvp1VKACEzwdLic,126
74
+ codelaw_rules_python/rules/py/no-star-import.md,sha256=gShLTi-hSD6hLrenAeH81DbSlomzKpWn__qDNZFiCFs,969
75
+ codelaw_rules_python/rules/py/no-tunable-literals.cases.md,sha256=WQkL_sNE_7wuen79zo2at9K3hryhv9TQtcYy9OBI0bQ,542
76
+ codelaw_rules_python/rules/py/no-tunable-literals.md,sha256=N7FoacFOVjL46RFZRiRvNwAOU8s9AnDN9LRHGfJNbOo,2331
77
+ codelaw_rules_python/rules/py/none-comparison.md,sha256=_zfVsIO9dc11XOIHQhh_ohcKgubmvP-ec4UYCsBFIWU,602
78
+ codelaw_rules_python/rules/py/not-in-test.md,sha256=ftt1WcyuOSMkBqRc7XxoOl6RB8cCOlNLTDw6nrL2xro,463
79
+ codelaw_rules_python/rules/py/not-is-test.md,sha256=m0g0Lis1MiP3hVDqRbe7RAN6Oy7W2Pz_63MsUcra4ko,464
80
+ codelaw_rules_python/rules/py/percent-format-count-mismatch.md,sha256=-0Xgzu7aZNPNC8SRkXUgf90bBcvqNGX-T34JbDzuwTk,772
81
+ codelaw_rules_python/rules/py/percent-format-expected-mapping.md,sha256=YqqKRkPXfQkNcRRJzt65XkGOEYil7KwMx6DY76XeaCc,676
82
+ codelaw_rules_python/rules/py/percent-format-expected-sequence.md,sha256=FFwCyeqh9021dvZ9ff5_CI5Qw8d-t5GJ6zOFGmobGgo,729
83
+ codelaw_rules_python/rules/py/percent-format-invalid.md,sha256=5d0ky4djlYuCwjZrAeBIvyP7cSllFeVynur6ms8x9T0,673
84
+ codelaw_rules_python/rules/py/percent-format-missing-argument.md,sha256=8_GwYRKz8Tm7vp9lzTdyZD5z9oxESKn7d_pV6W1ygMM,720
85
+ codelaw_rules_python/rules/py/percent-format-mixed-placeholders.md,sha256=TkKknsEhC0x0IlqeaafW0YLfkU1fpwepActjcN6F0Bw,784
86
+ codelaw_rules_python/rules/py/percent-format-star-requires-sequence.md,sha256=ylcHaVjJ-WvHuEu07BAwO9fEAyNUqkQCi7hCBonXwGY,693
87
+ codelaw_rules_python/rules/py/percent-format-unsupported-character.md,sha256=5p-X9GPV3elv6JjbYYEm8s8jG1ZJIMhGtjKHWBo9vGo,682
88
+ codelaw_rules_python/rules/py/percent-format-unused-named-argument.md,sha256=6Tk3x45teYWF2QF9-rGuXg7oXWeSKe_o7eOkXE_nJlA,674
89
+ codelaw_rules_python/rules/py/raise-literal.md,sha256=EQTNrMhM9EZdV6rXdDN0NSHP7koUSGUMPZn6ngQopOw,576
90
+ codelaw_rules_python/rules/py/raise-not-implemented.md,sha256=iWR0Cx01tgqHFQw1gVi9jmuxE6O8BDS3wICCp_hljvs,699
91
+ codelaw_rules_python/rules/py/raise-without-from-inside-except.cases.md,sha256=UXnrngcV51J7iBElNWG1t1q6O-lesLk8ocxK-XH7xQo,491
92
+ codelaw_rules_python/rules/py/raise-without-from-inside-except.md,sha256=gjoueg1kzt7FCqIs3LWbnTyXQo5RBeVx6wmdKK5zFWM,907
93
+ codelaw_rules_python/rules/py/re-sub-positional-args.md,sha256=wnLt2rGTLKqJeJcxHQEaOUlhryfm73h1KrWHcUDn9G0,733
94
+ codelaw_rules_python/rules/py/redefined-while-unused.cases.md,sha256=bMrRT0SvPiU70wQ_lTJJKpEhPPobd77-jfRKu1iOLHg,2016
95
+ codelaw_rules_python/rules/py/redefined-while-unused.md,sha256=V2zRHxfu3fMgiJ5kHS4T00G36CPBs54PzB69idzJbgc,967
96
+ codelaw_rules_python/rules/py/redundant-tuple-in-exception-handler.md,sha256=l0wfA5Y6eBAg6__ATQz4YvX2DxPkCpPvn6TyZmkiHKE,590
97
+ codelaw_rules_python/rules/py/return-outside-function.md,sha256=z4UkqaYAmlT8nZmlGau_LR8Q-o7lAkH3ihpvQBd8UeE,604
98
+ codelaw_rules_python/rules/py/reuse-of-groupby-generator.cases.md,sha256=vuhixLV3WQSDhBY4nFyf_ikIJsjBDbu4addS6LYO2Pg,582
99
+ codelaw_rules_python/rules/py/reuse-of-groupby-generator.md,sha256=O4jXKXFilY5ObJLBNBh2tszw-2PzeIITcwu8uKHAnHE,882
100
+ codelaw_rules_python/rules/py/setattr-with-constant.md,sha256=tuHVLqEc8UndKFvGlgtOQgXueoXg_2NFCSUj6oSeQ5A,542
101
+ codelaw_rules_python/rules/py/star-arg-unpacking-after-keyword-arg.md,sha256=Xit5raJeYZgNcF7FybBQonZzUwPOMS5NDA6b__IrKyU,737
102
+ codelaw_rules_python/rules/py/star-import-usage.cases.md,sha256=aZOspYq146ZSrZSXevLRiRz3FP3MYT7kuowpEM046eQ,393
103
+ codelaw_rules_python/rules/py/star-import-usage.md,sha256=5DECbRW-gP5Abfv4RgBD0SLIoI_ERgXaRuZcQuvkLYQ,811
104
+ codelaw_rules_python/rules/py/static-key-dict-comprehension.md,sha256=fRy93Zg4-AWiZOqrKp37DNcPP5lmTvE0UFl5y4ildCE,647
105
+ codelaw_rules_python/rules/py/strip-with-multi-characters.md,sha256=CZ6SZ8eCZfQC6D0WUybydTTbswccR0OtBMjVWoMcjDo,821
106
+ codelaw_rules_python/rules/py/too-many-expressions-in-star-assignment.md,sha256=0O-n54eGbfCiOUJGkQIpPn-nyD2B0DY5QryXlNnSmp0,2133
107
+ codelaw_rules_python/rules/py/true-false-comparison.cases.md,sha256=V-mbZ0b1aKjFZwstEBHflEOJO6ius3HsPOM5MsrZ584,361
108
+ codelaw_rules_python/rules/py/true-false-comparison.md,sha256=r0hy4W2kF1N3vJqIUWZmwmVXC-zdiEgo_G5UQkyxlNE,648
109
+ codelaw_rules_python/rules/py/type-comparison.md,sha256=ll9mVGxAZwHe6jwih78ycgJQ4d6VKqNulSMSfSxWvTg,765
110
+ codelaw_rules_python/rules/py/unary-prefix-increment.md,sha256=kEhXemMQ1y_G0rvaG9Xp3Dl0VqZNAiX_YxjWnbBJxc4,589
111
+ codelaw_rules_python/rules/py/undefined-export.md,sha256=eVszGTgr5cuEuVCIZBRbYK1gup_j9-zKly_9BhuK4fs,917
112
+ codelaw_rules_python/rules/py/undefined-future-feature.md,sha256=slSIQSu6-xObJc1-Pkek5jqKPw-RM9RwA0rR9fi6AXE,696
113
+ codelaw_rules_python/rules/py/undefined-local.cases.md,sha256=qGLvgFkzwbnucnB5TO5v2cy4R8oX9lmU07xO2AYwOyQ,848
114
+ codelaw_rules_python/rules/py/undefined-local.md,sha256=9g2WGWXbU1k2x9zGfMRdmw01N9rPsXi83cu0En4rMgE,863
115
+ codelaw_rules_python/rules/py/undefined-name.cases.md,sha256=txKSUmo_fvX15hunps2-TVeqZqcz1rBnH9WfNXENcuY,1452
116
+ codelaw_rules_python/rules/py/undefined-name.md,sha256=g72IwqwB_8JTyCQbVy8LSAEvZf4DHabvYpnL3lkjwDw,846
117
+ codelaw_rules_python/rules/py/unintentional-type-annotation.cases.md,sha256=m5tl6MJcDIWI_w4rVi0NNbwV82UpyX52ZoI8mgIat90,175
118
+ codelaw_rules_python/rules/py/unintentional-type-annotation.md,sha256=SlEcetYCBUh3RUHdtJr0reioWGFX9BgAjaIA0waUjZg,636
119
+ codelaw_rules_python/rules/py/unreliable-callable-check.md,sha256=J08myNUaymvVpzalEngLq0zsUdSKGT84h0WtdjYFCAY,669
120
+ codelaw_rules_python/rules/py/unsorted-imports.cases.md,sha256=s3P2dTGFytZhszFqoFpZ9DvnE2c1UYbLz3ORmPyE67A,1737
121
+ codelaw_rules_python/rules/py/unsorted-imports.md,sha256=x4nHSD6BRibDXyPpvbDSHNdhoUKdR-C64MNwstNxwCc,1715
122
+ codelaw_rules_python/rules/py/unused-annotation.md,sha256=iMwdT5J3h6CkzvnoilHhytKQJuDyg99EMsZH4fqF9AQ,535
123
+ codelaw_rules_python/rules/py/unused-import.cases.md,sha256=HsIDfYtVylw0tk1nNh7113GwfMXDElbLwDwbyTIVbEo,3350
124
+ codelaw_rules_python/rules/py/unused-import.md,sha256=Bh79fdCiBPif1ZiBYTDW6qI-tX3EhzX53-fSoI4zBXs,1163
125
+ codelaw_rules_python/rules/py/unused-loop-control-variable.cases.md,sha256=OeEg_GtPyDEKMfHTsc54ZT6IDTVf_UUZHozleR9Hdoc,393
126
+ codelaw_rules_python/rules/py/unused-loop-control-variable.md,sha256=kEFk1FDXuWEMCkqK7qoeyiRzGIKtEL5lzlSQ4N0SDiU,655
127
+ codelaw_rules_python/rules/py/unused-variable.cases.md,sha256=nJO9jRIJCtpkdNzTXJp95EGVPE6Ebc0CuXIgczlwqOM,1675
128
+ codelaw_rules_python/rules/py/unused-variable.md,sha256=uKaWXChs1Q2blhyUHHxVbxC_efHcvQv67hLSgn_BGNg,742
129
+ codelaw_rules_python/rules/py/useless-comparison.md,sha256=ZDZEm2oo2fiXZeU8zwxeI8Gq8eFIMT1oywzDEy3nE60,680
130
+ codelaw_rules_python/rules/py/useless-contextlib-suppress.md,sha256=MNgLr3OMDYl_2B4tUv2y7VSgwRUHqVcrk0fQWIkS4lM,763
131
+ codelaw_rules_python/rules/py/useless-expression.cases.md,sha256=tgDPm7zPIlRY1dnzYe1ZKBh3_N-YXrkXcRDnFy-UqGE,550
132
+ codelaw_rules_python/rules/py/useless-expression.md,sha256=706a7EPRcXKEuRj9-trJDKpghFNm6QWYRyOMQrPcuNw,839
133
+ codelaw_rules_python/rules/py/yield-outside-function.md,sha256=RXjHTgko4PTTs17Ku8peaQjCLIW5UyOfU291U_W13wc,794
134
+ codelaw_rules_python/rules/py/zip-without-explicit-strict.cases.md,sha256=DJGRawjfqaGIpGUUXzaymEwLDjMvybRMaJYqF6gVF44,320
135
+ codelaw_rules_python/rules/py/zip-without-explicit-strict.md,sha256=lvMcy8QRZY2bi5twuB_g_JnC1nBqDsEntytZfzcTZKE,1316
136
+ codelaw_rules_python-0.2.0.dist-info/METADATA,sha256=g7jOY7ho9VDClJPsO-fQfKTG4mqSI7IPdl_RhrQrrmI,11567
137
+ codelaw_rules_python-0.2.0.dist-info/WHEEL,sha256=iL940CG79gUG1gJG0fuOXtdNe75u1bVsFzkAeObStpM,97
138
+ codelaw_rules_python-0.2.0.dist-info/licenses/LICENSE,sha256=_R8NFLyGiKUo7mPzbUGbqg3hdEKYhaTsIgBGXqtFfa8,1097
139
+ codelaw_rules_python-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: codelaw scripts/package.py
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arpit Arya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ SPDX-License-Identifier: MIT