@neralabs/rerail-pack-python 0.1.2 → 0.1.3
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.
- package/README.md +3 -3
- package/licenses/bandit/UPSTREAM.md +10 -0
- package/licenses/ruff/UPSTREAM.md +56 -0
- package/pack.json +7 -20
- package/package.json +1 -1
- package/rules/ruff-b030-except-with-non-exception-classes.json +406 -0
- package/rules/bandit-b406-import-xml-sax.json +0 -73
- package/rules/bandit-b610-django-extra-used.json +0 -268
- package/rules/ruff-f722-forward-annotation-syntax-error.json +0 -654
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Rerail rule pack: Python
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
136 code rules for Python, ported from Ruff 0.16.9 (98 rules) and Bandit 1.9.4 (38 tests). Each is scored against the
|
|
4
4
|
tool's own findings on the tool's test fixtures, through the engine's production workspace path, with every
|
|
5
5
|
disagreement declared in `divergences.json` (one today: ASYNC221 on a probe). Every port honours its tool's
|
|
6
6
|
suppression comment, as the tool does: Ruff's `# noqa` (`suppress.noqa`) and Bandit's `# nosec` (`suppress.nosec`).
|
|
7
|
-
|
|
7
|
+
24 Ruff rules that Ruff's default selection leaves off ship off (`"on": false` in `pack.json`).
|
|
8
8
|
|
|
9
9
|
This is the reference pack for the [pack structure and validation contract](../../docs/pack-format.md): it is
|
|
10
10
|
checked by `npx vitest run test/engine/catalog/packs.test.ts`.
|
|
@@ -17,7 +17,7 @@ checked by `npx vitest run test/engine/catalog/packs.test.ts`.
|
|
|
17
17
|
| `divergences.json` | Declared disagreements with the tools |
|
|
18
18
|
| `upstream/<tool>/` | The tool's copied tests (`fixtures/`), the cases Rerail wrote for it (`fixtures/rerail/`, listed in `UPSTREAM.md`: every shipped rule on lines carrying `# noqa` or `# nosec`, and probes of inputs the ports once misread), its recordings (`fixtures.expected.json`, `corpus-django.expected.json`) and the recorder (`generate.py`, sharing `upstream/common.py`) |
|
|
19
19
|
| `licenses/<tool>/` | The tool's licence and `UPSTREAM.md`, listing every copied file |
|
|
20
|
-
| `candidates/rules/` | Ports still being evaluated (
|
|
20
|
+
| `candidates/rules/` | Ports still being evaluated (98 Ruff and Bandit ports): never shipped or listed in `pack.json`. 96 have a `conformance.json` port and are scored against the recordings without gating; A005 (GPL-derived fixtures only) and INP001 (tested only with a `namespace-packages` option) are not recorded |
|
|
21
21
|
|
|
22
22
|
Re-recording runs offline against the pinned tool versions, under CPython 3.14 (Bandit itself runs from its own
|
|
23
23
|
install, on CPython 3.13):
|
|
@@ -14,6 +14,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
14
14
|
|
|
15
15
|
| File | Upstream path | Copy |
|
|
16
16
|
|---|---|---|
|
|
17
|
+
| `upstream/bandit/fixtures/__init__.py` | `examples/__init__.py` | verbatim |
|
|
17
18
|
| `upstream/bandit/fixtures/assert.py` | `examples/assert.py` | verbatim |
|
|
18
19
|
| `upstream/bandit/fixtures/binding.py` | `examples/binding.py` | verbatim |
|
|
19
20
|
| `upstream/bandit/fixtures/cipher-modes.py` | `examples/cipher-modes.py` | verbatim |
|
|
@@ -38,9 +39,12 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
38
39
|
| `upstream/bandit/fixtures/imports-function.py` | `examples/imports-function.py` | verbatim |
|
|
39
40
|
| `upstream/bandit/fixtures/imports-with-importlib.py` | `examples/imports-with-importlib.py` | verbatim |
|
|
40
41
|
| `upstream/bandit/fixtures/imports.py` | `examples/imports.py` | verbatim |
|
|
42
|
+
| `upstream/bandit/fixtures/init-py-test/__init__.py` | `examples/init-py-test/__init__.py` | verbatim |
|
|
43
|
+
| `upstream/bandit/fixtures/init-py-test/subdirectory-okay.py` | `examples/init-py-test/subdirectory-okay.py` | verbatim |
|
|
41
44
|
| `upstream/bandit/fixtures/jinja2_templating.py` | `examples/jinja2_templating.py` | verbatim |
|
|
42
45
|
| `upstream/bandit/fixtures/jsonpickle.py` | `examples/jsonpickle.py` | verbatim |
|
|
43
46
|
| `upstream/bandit/fixtures/logging_config_insecure_listen.py` | `examples/logging_config_insecure_listen.py` | verbatim |
|
|
47
|
+
| `upstream/bandit/fixtures/long_set.py` | `examples/long_set.py` | verbatim |
|
|
44
48
|
| `upstream/bandit/fixtures/mako_templating.py` | `examples/mako_templating.py` | verbatim |
|
|
45
49
|
| `upstream/bandit/fixtures/mark_safe.py` | `examples/mark_safe.py` | verbatim |
|
|
46
50
|
| `upstream/bandit/fixtures/mark_safe_insecure.py` | `examples/mark_safe_insecure.py` | verbatim |
|
|
@@ -52,10 +56,14 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
52
56
|
| `upstream/bandit/fixtures/mktemp.py` | `examples/mktemp.py` | verbatim |
|
|
53
57
|
| `upstream/bandit/fixtures/multiline_statement.py` | `examples/multiline_statement.py` | verbatim |
|
|
54
58
|
| `upstream/bandit/fixtures/new_candidates-all.py` | `examples/new_candidates-all.py` | verbatim |
|
|
59
|
+
| `upstream/bandit/fixtures/new_candidates-none.py` | `examples/new_candidates-none.py` | verbatim |
|
|
55
60
|
| `upstream/bandit/fixtures/new_candidates-nosec.py` | `examples/new_candidates-nosec.py` | verbatim |
|
|
56
61
|
| `upstream/bandit/fixtures/new_candidates-some.py` | `examples/new_candidates-some.py` | verbatim |
|
|
57
62
|
| `upstream/bandit/fixtures/no_host_key_verification.py` | `examples/no_host_key_verification.py` | verbatim |
|
|
63
|
+
| `upstream/bandit/fixtures/nonsense.py` | `examples/nonsense.py` | verbatim |
|
|
64
|
+
| `upstream/bandit/fixtures/nonsense2.py` | `examples/nonsense2.py` | verbatim |
|
|
58
65
|
| `upstream/bandit/fixtures/nosec.py` | `examples/nosec.py` | verbatim |
|
|
66
|
+
| `upstream/bandit/fixtures/okay.py` | `examples/okay.py` | verbatim |
|
|
59
67
|
| `upstream/bandit/fixtures/os-chmod.py` | `examples/os-chmod.py` | verbatim |
|
|
60
68
|
| `upstream/bandit/fixtures/os-exec.py` | `examples/os-exec.py` | verbatim |
|
|
61
69
|
| `upstream/bandit/fixtures/os-popen.py` | `examples/os-popen.py` | verbatim |
|
|
@@ -68,6 +76,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
68
76
|
| `upstream/bandit/fixtures/pickle_deserialize.py` | `examples/pickle_deserialize.py` | verbatim |
|
|
69
77
|
| `upstream/bandit/fixtures/popen_wrappers.py` | `examples/popen_wrappers.py` | verbatim |
|
|
70
78
|
| `upstream/bandit/fixtures/pycrypto.py` | `examples/pycrypto.py` | verbatim |
|
|
79
|
+
| `upstream/bandit/fixtures/pycryptodome.py` | `examples/pycryptodome.py` | verbatim |
|
|
71
80
|
| `upstream/bandit/fixtures/pyghmi.py` | `examples/pyghmi.py` | verbatim |
|
|
72
81
|
| `upstream/bandit/fixtures/pytorch_load.py` | `examples/pytorch_load.py` | verbatim |
|
|
73
82
|
| `upstream/bandit/fixtures/random_module.py` | `examples/random_module.py` | verbatim |
|
|
@@ -83,6 +92,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
83
92
|
| `upstream/bandit/fixtures/tarfile_extractall.py` | `examples/tarfile_extractall.py` | verbatim |
|
|
84
93
|
| `upstream/bandit/fixtures/telnetlib.py` | `examples/telnetlib.py` | verbatim |
|
|
85
94
|
| `upstream/bandit/fixtures/trojansource.py` | `examples/trojansource.py` | verbatim |
|
|
95
|
+
| `upstream/bandit/fixtures/trojansource_latin1.py` | `examples/trojansource_latin1.py` | verbatim |
|
|
86
96
|
| `upstream/bandit/fixtures/try_except_continue.py` | `examples/try_except_continue.py` | verbatim |
|
|
87
97
|
| `upstream/bandit/fixtures/try_except_pass.py` | `examples/try_except_pass.py` | verbatim |
|
|
88
98
|
| `upstream/bandit/fixtures/unverified_context.py` | `examples/unverified_context.py` | verbatim |
|
|
@@ -10,6 +10,16 @@ rest is under the Apache License 2.0 (the pack's `LICENSE`): the recorders `upst
|
|
|
10
10
|
|
|
11
11
|
Ruff's `LICENSE` also carries the notices of the projects Ruff derives from, Pyflakes among them. Ruff's pyflakes fixtures come with that notice.
|
|
12
12
|
|
|
13
|
+
Some of Ruff's rules are ports of plugins under copyleft licences, and Ruff's fixtures for them carry those plugins' test
|
|
14
|
+
code. Nothing under these upstream paths is copied, so their rules are not recorded, and no port readiness recording
|
|
15
|
+
holds their text (`upstream/ruff/generate.py`, the port readiness recorder and the pack check all read this list):
|
|
16
|
+
|
|
17
|
+
- Not copied: `crates/ruff_linter/resources/test/fixtures/flake8_builtins/` — flake8-builtins, GPL-2.0
|
|
18
|
+
- Not copied: `crates/ruff_linter/resources/test/fixtures/flake8_django/` — flake8-django, GPL-3.0-or-later
|
|
19
|
+
- Not copied: `crates/ruff_linter/resources/test/fixtures/flake8_executable/` — flake8-executable, LGPL-3.0-or-later
|
|
20
|
+
- Not copied: `crates/ruff_linter/resources/test/fixtures/pylint/` — pylint, GPL-2.0-or-later
|
|
21
|
+
- Not copied: `crates/ruff_linter/resources/test/fixtures/refurb/` — refurb, GPL-3.0-only
|
|
22
|
+
|
|
13
23
|
Paths are relative to the pack directory, `packs/python/`.
|
|
14
24
|
|
|
15
25
|
| File | Upstream path | Copy |
|
|
@@ -44,16 +54,20 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
44
54
|
| `upstream/ruff/fixtures/flake8_bugbear/B006_8.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B006_8.py` | verbatim |
|
|
45
55
|
| `upstream/ruff/fixtures/flake8_bugbear/B006_9.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B006_9.py` | verbatim |
|
|
46
56
|
| `upstream/ruff/fixtures/flake8_bugbear/B006_B008.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B006_B008.py` | verbatim |
|
|
57
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B006_extended.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B006_extended.py` | verbatim |
|
|
47
58
|
| `upstream/ruff/fixtures/flake8_bugbear/B007.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B007.py` | verbatim |
|
|
59
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B008_extended.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B008_extended.py` | verbatim |
|
|
48
60
|
| `upstream/ruff/fixtures/flake8_bugbear/B009_B010.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B009_B010.py` | verbatim |
|
|
49
61
|
| `upstream/ruff/fixtures/flake8_bugbear/B011.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B011.py` | verbatim |
|
|
50
62
|
| `upstream/ruff/fixtures/flake8_bugbear/B012.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B012.py` | verbatim |
|
|
51
63
|
| `upstream/ruff/fixtures/flake8_bugbear/B013.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B013.py` | verbatim |
|
|
52
64
|
| `upstream/ruff/fixtures/flake8_bugbear/B014.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B014.py` | verbatim |
|
|
65
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B015.ipynb` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B015.ipynb` | verbatim |
|
|
53
66
|
| `upstream/ruff/fixtures/flake8_bugbear/B015.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B015.py` | verbatim |
|
|
54
67
|
| `upstream/ruff/fixtures/flake8_bugbear/B016.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B016.py` | verbatim |
|
|
55
68
|
| `upstream/ruff/fixtures/flake8_bugbear/B017_0.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B017_0.py` | verbatim |
|
|
56
69
|
| `upstream/ruff/fixtures/flake8_bugbear/B017_1.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B017_1.py` | verbatim |
|
|
70
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B018.ipynb` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B018.ipynb` | verbatim |
|
|
57
71
|
| `upstream/ruff/fixtures/flake8_bugbear/B018.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B018.py` | verbatim |
|
|
58
72
|
| `upstream/ruff/fixtures/flake8_bugbear/B019.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B019.py` | verbatim |
|
|
59
73
|
| `upstream/ruff/fixtures/flake8_bugbear/B020.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B020.py` | verbatim |
|
|
@@ -73,7 +87,9 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
73
87
|
| `upstream/ruff/fixtures/flake8_bugbear/B033.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B033.py` | verbatim |
|
|
74
88
|
| `upstream/ruff/fixtures/flake8_bugbear/B034.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B034.py` | verbatim |
|
|
75
89
|
| `upstream/ruff/fixtures/flake8_bugbear/B035.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B035.py` | verbatim |
|
|
90
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B035_py315.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B035_py315.py` | verbatim |
|
|
76
91
|
| `upstream/ruff/fixtures/flake8_bugbear/B039.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B039.py` | verbatim |
|
|
92
|
+
| `upstream/ruff/fixtures/flake8_bugbear/B039_extended.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B039_extended.py` | verbatim |
|
|
77
93
|
| `upstream/ruff/fixtures/flake8_bugbear/B904.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B904.py` | verbatim |
|
|
78
94
|
| `upstream/ruff/fixtures/flake8_bugbear/B905.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B905.py` | verbatim |
|
|
79
95
|
| `upstream/ruff/fixtures/flake8_bugbear/B911.py` | `crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B911.py` | verbatim |
|
|
@@ -105,6 +121,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
105
121
|
| `upstream/ruff/fixtures/flake8_simplify/SIM105_2.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM105_2.py` | verbatim |
|
|
106
122
|
| `upstream/ruff/fixtures/flake8_simplify/SIM105_3.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM105_3.py` | verbatim |
|
|
107
123
|
| `upstream/ruff/fixtures/flake8_simplify/SIM105_4.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM105_4.py` | verbatim |
|
|
124
|
+
| `upstream/ruff/fixtures/flake8_simplify/SIM105_5.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM105_5.py` | verbatim |
|
|
108
125
|
| `upstream/ruff/fixtures/flake8_simplify/SIM107.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM107.py` | verbatim |
|
|
109
126
|
| `upstream/ruff/fixtures/flake8_simplify/SIM108.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM108.py` | verbatim |
|
|
110
127
|
| `upstream/ruff/fixtures/flake8_simplify/SIM109.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM109.py` | verbatim |
|
|
@@ -132,6 +149,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
132
149
|
| `upstream/ruff/fixtures/flake8_simplify/SIM905.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM905.py` | verbatim |
|
|
133
150
|
| `upstream/ruff/fixtures/flake8_simplify/SIM910.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM910.py` | verbatim |
|
|
134
151
|
| `upstream/ruff/fixtures/flake8_simplify/SIM911.py` | `crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM911.py` | verbatim |
|
|
152
|
+
| `upstream/ruff/fixtures/isort/required_imports/unused.py` | `crates/ruff_linter/resources/test/fixtures/isort/required_imports/unused.py` | verbatim |
|
|
135
153
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/MODULE/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/MODULE/__init__.py` | verbatim |
|
|
136
154
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/MODULE/file.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/MODULE/file.py` | verbatim |
|
|
137
155
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/flake9/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/flake9/__init__.py` | verbatim |
|
|
@@ -140,17 +158,26 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
140
158
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/mod with spaces/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/mod with spaces/__init__.py` | verbatim |
|
|
141
159
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/mod with spaces/file.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/mod with spaces/file.py` | verbatim |
|
|
142
160
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/mod-with-dashes/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/mod-with-dashes/__init__.py` | verbatim |
|
|
161
|
+
| `upstream/ruff/fixtures/pep8_naming/N999/module/no_module/test.txt` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/no_module/test.txt` | verbatim |
|
|
143
162
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/valid_name/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/valid_name/__init__.py` | verbatim |
|
|
144
163
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/valid_name/__main__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/valid_name/__main__.py` | verbatim |
|
|
145
164
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/valid_name/__setup__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/valid_name/__setup__.py` | verbatim |
|
|
146
165
|
| `upstream/ruff/fixtures/pep8_naming/N999/module/valid_name/file-with-dashes.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/valid_name/file-with-dashes.py` | verbatim |
|
|
166
|
+
| `upstream/ruff/fixtures/pep8_naming/N999/module/valid_name/file-with-dashes` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/N999/module/valid_name/file-with-dashes` | verbatim |
|
|
167
|
+
| `upstream/ruff/fixtures/pep8_naming/ignore_names/N999/badAllowed/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pep8_naming/ignore_names/N999/badAllowed/__init__.py` | verbatim |
|
|
147
168
|
| `upstream/ruff/fixtures/pycodestyle/E40.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E40.py` | verbatim |
|
|
169
|
+
| `upstream/ruff/fixtures/pycodestyle/E402.ipynb` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402.ipynb` | verbatim |
|
|
148
170
|
| `upstream/ruff/fixtures/pycodestyle/E402_0.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_0.py` | verbatim |
|
|
149
171
|
| `upstream/ruff/fixtures/pycodestyle/E402_1.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_1.py` | verbatim |
|
|
150
172
|
| `upstream/ruff/fixtures/pycodestyle/E402_2.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_2.py` | verbatim |
|
|
151
173
|
| `upstream/ruff/fixtures/pycodestyle/E402_3.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_3.py` | verbatim |
|
|
152
174
|
| `upstream/ruff/fixtures/pycodestyle/E402_4.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_4.py` | verbatim |
|
|
153
175
|
| `upstream/ruff/fixtures/pycodestyle/E402_5.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_5.py` | verbatim |
|
|
176
|
+
| `upstream/ruff/fixtures/pycodestyle/E402_comments.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_comments.py` | verbatim |
|
|
177
|
+
| `upstream/ruff/fixtures/pycodestyle/E402_docstring.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_docstring.py` | verbatim |
|
|
178
|
+
| `upstream/ruff/fixtures/pycodestyle/E402_future.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_future.py` | verbatim |
|
|
179
|
+
| `upstream/ruff/fixtures/pycodestyle/E402_shebang.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_shebang.py` | verbatim |
|
|
180
|
+
| `upstream/ruff/fixtures/pycodestyle/E402_shebang_docstring_and_future.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E402_shebang_docstring_and_future.py` | verbatim |
|
|
154
181
|
| `upstream/ruff/fixtures/pycodestyle/E711.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E711.py` | verbatim |
|
|
155
182
|
| `upstream/ruff/fixtures/pycodestyle/E712.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E712.py` | verbatim |
|
|
156
183
|
| `upstream/ruff/fixtures/pycodestyle/E713.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E713.py` | verbatim |
|
|
@@ -162,6 +189,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
162
189
|
| `upstream/ruff/fixtures/pycodestyle/E741.pyi` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E741.pyi` | verbatim |
|
|
163
190
|
| `upstream/ruff/fixtures/pycodestyle/E742.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E742.py` | verbatim |
|
|
164
191
|
| `upstream/ruff/fixtures/pycodestyle/E743.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/E743.py` | verbatim |
|
|
192
|
+
| `upstream/ruff/fixtures/pycodestyle/W391_after_empty_cell_fix.ipynb` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/W391_after_empty_cell_fix.ipynb` | verbatim |
|
|
165
193
|
| `upstream/ruff/fixtures/pycodestyle/W605_0.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/W605_0.py` | verbatim |
|
|
166
194
|
| `upstream/ruff/fixtures/pycodestyle/W605_1.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/W605_1.py` | verbatim |
|
|
167
195
|
| `upstream/ruff/fixtures/pycodestyle/constant_literals.py` | `crates/ruff_linter/resources/test/fixtures/pycodestyle/constant_literals.py` | verbatim |
|
|
@@ -189,7 +217,10 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
189
217
|
| `upstream/ruff/fixtures/pyflakes/F401_28__all_multiple/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_28__all_multiple/__init__.py` | verbatim |
|
|
190
218
|
| `upstream/ruff/fixtures/pyflakes/F401_29__all_conditional/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_29__all_conditional/__init__.py` | verbatim |
|
|
191
219
|
| `upstream/ruff/fixtures/pyflakes/F401_3.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_3.py` | verbatim |
|
|
220
|
+
| `upstream/ruff/fixtures/pyflakes/F401_30.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_30.py` | verbatim |
|
|
221
|
+
| `upstream/ruff/fixtures/pyflakes/F401_31.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_31.py` | verbatim |
|
|
192
222
|
| `upstream/ruff/fixtures/pyflakes/F401_32.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_32.py` | verbatim |
|
|
223
|
+
| `upstream/ruff/fixtures/pyflakes/F401_33/__init__.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_33/__init__.py` | verbatim |
|
|
193
224
|
| `upstream/ruff/fixtures/pyflakes/F401_34.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_34.py` | verbatim |
|
|
194
225
|
| `upstream/ruff/fixtures/pyflakes/F401_35.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_35.py` | verbatim |
|
|
195
226
|
| `upstream/ruff/fixtures/pyflakes/F401_4.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_4.py` | verbatim |
|
|
@@ -198,6 +229,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
198
229
|
| `upstream/ruff/fixtures/pyflakes/F401_7.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_7.py` | verbatim |
|
|
199
230
|
| `upstream/ruff/fixtures/pyflakes/F401_8.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_8.py` | verbatim |
|
|
200
231
|
| `upstream/ruff/fixtures/pyflakes/F401_9.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F401_9.py` | verbatim |
|
|
232
|
+
| `upstream/ruff/fixtures/pyflakes/F402.ipynb` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F402.ipynb` | verbatim |
|
|
201
233
|
| `upstream/ruff/fixtures/pyflakes/F402.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F402.py` | verbatim |
|
|
202
234
|
| `upstream/ruff/fixtures/pyflakes/F403.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F403.py` | verbatim |
|
|
203
235
|
| `upstream/ruff/fixtures/pyflakes/F404_0.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F404_0.py` | verbatim |
|
|
@@ -256,7 +288,9 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
256
288
|
| `upstream/ruff/fixtures/pyflakes/F811_30.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_30.py` | verbatim |
|
|
257
289
|
| `upstream/ruff/fixtures/pyflakes/F811_31.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_31.py` | verbatim |
|
|
258
290
|
| `upstream/ruff/fixtures/pyflakes/F811_32.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_32.py` | verbatim |
|
|
291
|
+
| `upstream/ruff/fixtures/pyflakes/F811_33.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_33.py` | verbatim |
|
|
259
292
|
| `upstream/ruff/fixtures/pyflakes/F811_33.pyi` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_33.pyi` | verbatim |
|
|
293
|
+
| `upstream/ruff/fixtures/pyflakes/F811_34.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_34.py` | verbatim |
|
|
260
294
|
| `upstream/ruff/fixtures/pyflakes/F811_35.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_35.py` | verbatim |
|
|
261
295
|
| `upstream/ruff/fixtures/pyflakes/F811_36.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_36.py` | verbatim |
|
|
262
296
|
| `upstream/ruff/fixtures/pyflakes/F811_4.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F811_4.py` | verbatim |
|
|
@@ -281,6 +315,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
281
315
|
| `upstream/ruff/fixtures/pyflakes/F821_2.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_2.py` | verbatim |
|
|
282
316
|
| `upstream/ruff/fixtures/pyflakes/F821_20.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_20.py` | verbatim |
|
|
283
317
|
| `upstream/ruff/fixtures/pyflakes/F821_21.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_21.py` | verbatim |
|
|
318
|
+
| `upstream/ruff/fixtures/pyflakes/F821_22.ipynb` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_22.ipynb` | verbatim |
|
|
284
319
|
| `upstream/ruff/fixtures/pyflakes/F821_23.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_23.py` | verbatim |
|
|
285
320
|
| `upstream/ruff/fixtures/pyflakes/F821_24.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_24.py` | verbatim |
|
|
286
321
|
| `upstream/ruff/fixtures/pyflakes/F821_25.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_25.py` | verbatim |
|
|
@@ -288,6 +323,7 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
288
323
|
| `upstream/ruff/fixtures/pyflakes/F821_26.pyi` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_26.pyi` | verbatim |
|
|
289
324
|
| `upstream/ruff/fixtures/pyflakes/F821_27.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_27.py` | verbatim |
|
|
290
325
|
| `upstream/ruff/fixtures/pyflakes/F821_28.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_28.py` | verbatim |
|
|
326
|
+
| `upstream/ruff/fixtures/pyflakes/F821_29.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_29.py` | verbatim |
|
|
291
327
|
| `upstream/ruff/fixtures/pyflakes/F821_3.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_3.py` | verbatim |
|
|
292
328
|
| `upstream/ruff/fixtures/pyflakes/F821_30.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_30.py` | verbatim |
|
|
293
329
|
| `upstream/ruff/fixtures/pyflakes/F821_31.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/F821_31.py` | verbatim |
|
|
@@ -319,10 +355,13 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
319
355
|
| `upstream/ruff/fixtures/pyflakes/builtins.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/builtins.py` | verbatim |
|
|
320
356
|
| `upstream/ruff/fixtures/pyflakes/future_annotations.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/future_annotations.py` | verbatim |
|
|
321
357
|
| `upstream/ruff/fixtures/pyflakes/multi_statement_lines.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/multi_statement_lines.py` | verbatim |
|
|
358
|
+
| `upstream/ruff/fixtures/pyflakes/project/foo/bar.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/project/foo/bar.py` | verbatim |
|
|
359
|
+
| `upstream/ruff/fixtures/pyflakes/project/foo/bop/baz.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/project/foo/bop/baz.py` | verbatim |
|
|
322
360
|
| `upstream/ruff/fixtures/pyflakes/typing_modules.py` | `crates/ruff_linter/resources/test/fixtures/pyflakes/typing_modules.py` | verbatim |
|
|
323
361
|
| `upstream/ruff/fixtures/ruff/RUF050_F401.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF050_F401.py` | verbatim |
|
|
324
362
|
| `upstream/ruff/fixtures/ruff/RUF072_RUF047_SIM105.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF072_RUF047_SIM105.py` | verbatim |
|
|
325
363
|
| `upstream/ruff/fixtures/ruff/RUF072_SIM105.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF072_SIM105.py` | verbatim |
|
|
364
|
+
| `upstream/ruff/fixtures/ruff/RUF100_0.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF100_0.py` | verbatim |
|
|
326
365
|
| `upstream/ruff/fixtures/ruff/RUF100_1.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF100_1.py` | verbatim |
|
|
327
366
|
| `upstream/ruff/fixtures/ruff/RUF100_2.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF100_2.py` | verbatim |
|
|
328
367
|
| `upstream/ruff/fixtures/ruff/RUF100_3.py` | `crates/ruff_linter/resources/test/fixtures/ruff/RUF100_3.py` | verbatim |
|
|
@@ -333,6 +372,23 @@ Paths are relative to the pack directory, `packs/python/`.
|
|
|
333
372
|
| `upstream/ruff/fixtures/ruff/ruff_noqa_all.py` | `crates/ruff_linter/resources/test/fixtures/ruff/ruff_noqa_all.py` | verbatim |
|
|
334
373
|
| `upstream/ruff/fixtures/ruff/ruff_noqa_codes.py` | `crates/ruff_linter/resources/test/fixtures/ruff/ruff_noqa_codes.py` | verbatim |
|
|
335
374
|
| `upstream/ruff/fixtures/ruff/ruff_noqa_invalid.py` | `crates/ruff_linter/resources/test/fixtures/ruff/ruff_noqa_invalid.py` | verbatim |
|
|
375
|
+
| `upstream/ruff/fixtures/ruff/ruff_per_file_ignores.py` | `crates/ruff_linter/resources/test/fixtures/ruff/ruff_per_file_ignores.py` | verbatim |
|
|
376
|
+
| `upstream/ruff/fixtures/ruff/suppressions.py` | `crates/ruff_linter/resources/test/fixtures/ruff/suppressions.py` | verbatim |
|
|
377
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/add_missing_cell_id.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb` | verbatim |
|
|
378
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/before_fix.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/before_fix.ipynb` | verbatim |
|
|
379
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/ipy_escape_command.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/ipy_escape_command.ipynb` | verbatim |
|
|
380
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/no_cell_id.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/no_cell_id.ipynb` | verbatim |
|
|
381
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/undefined_name.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/undefined_name.ipynb` | verbatim |
|
|
382
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/unused_variable.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb` | verbatim |
|
|
383
|
+
| `upstream/ruff/fixtures/ruff_notebook/jupyter/vscode_language_id.ipynb` | `crates/ruff_notebook/resources/test/fixtures/jupyter/vscode_language_id.ipynb` | verbatim |
|
|
384
|
+
| `upstream/ruff/fixtures/syntax_errors/await_scope.ipynb` | `crates/ruff_linter/resources/test/fixtures/syntax_errors/await_scope.ipynb` | verbatim |
|
|
336
385
|
| `upstream/ruff/fixtures/syntax_errors/late_future_import.py` | `crates/ruff_linter/resources/test/fixtures/syntax_errors/late_future_import.py` | verbatim |
|
|
337
386
|
| `upstream/ruff/fixtures/syntax_errors/return_outside_function.py` | `crates/ruff_linter/resources/test/fixtures/syntax_errors/return_outside_function.py` | verbatim |
|
|
338
387
|
| `upstream/ruff/fixtures/syntax_errors/yield_scope.py` | `crates/ruff_linter/resources/test/fixtures/syntax_errors/yield_scope.py` | verbatim |
|
|
388
|
+
|
|
389
|
+
> `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
|
|
390
|
+
> table above: the tool-pack's `recording.lock` names it and a GitHub release holds the bytes (docs/port-readiness.md).
|
|
391
|
+
> It carries excerpts of this upstream's tests (`crates/ruff_linter/src/rules/*/mod.rs`,
|
|
392
|
+
> `crates/ruff_linter/src/linter.rs`: their test modules' string literals), redistributed under the licence above,
|
|
393
|
+
> together with Rerail's Apache-2.0; the LICENSE beside this file is this upstream's own, at the pinned commit.
|
|
394
|
+
|
package/pack.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "python",
|
|
4
4
|
"name": "Python",
|
|
5
5
|
"category": "language",
|
|
6
|
-
"covers": "
|
|
6
|
+
"covers": "136 Ruff and Bandit rules ported to Rerail, each scored against the tool's own recorded findings on its test fixtures.",
|
|
7
7
|
"reason": "matches Python",
|
|
8
8
|
"match": {
|
|
9
9
|
"any": [
|
|
@@ -213,6 +213,12 @@
|
|
|
213
213
|
"title": "Ruff B029: Except with empty tuple",
|
|
214
214
|
"group": "Ruff"
|
|
215
215
|
},
|
|
216
|
+
{
|
|
217
|
+
"id": "ruff-b030-except-with-non-exception-classes",
|
|
218
|
+
"document": "rules/ruff-b030-except-with-non-exception-classes.json",
|
|
219
|
+
"title": "Ruff B030: Except with non exception classes",
|
|
220
|
+
"group": "Ruff"
|
|
221
|
+
},
|
|
216
222
|
{
|
|
217
223
|
"id": "ruff-b032-unintentional-type-annotation",
|
|
218
224
|
"document": "rules/ruff-b032-unintentional-type-annotation.json",
|
|
@@ -467,13 +473,6 @@
|
|
|
467
473
|
"title": "Ruff F707: Default except not last",
|
|
468
474
|
"group": "Ruff"
|
|
469
475
|
},
|
|
470
|
-
{
|
|
471
|
-
"id": "ruff-f722-forward-annotation-syntax-error",
|
|
472
|
-
"document": "rules/ruff-f722-forward-annotation-syntax-error.json",
|
|
473
|
-
"title": "Ruff F722: Forward annotation syntax error",
|
|
474
|
-
"group": "Ruff",
|
|
475
|
-
"on": false
|
|
476
|
-
},
|
|
477
476
|
{
|
|
478
477
|
"id": "ruff-f822-undefined-export",
|
|
479
478
|
"document": "rules/ruff-f822-undefined-export.json",
|
|
@@ -830,12 +829,6 @@
|
|
|
830
829
|
"title": "Bandit B405: Import xml etree",
|
|
831
830
|
"group": "Bandit"
|
|
832
831
|
},
|
|
833
|
-
{
|
|
834
|
-
"id": "bandit-b406-import-xml-sax",
|
|
835
|
-
"document": "rules/bandit-b406-import-xml-sax.json",
|
|
836
|
-
"title": "Bandit B406: Import xml sax",
|
|
837
|
-
"group": "Bandit"
|
|
838
|
-
},
|
|
839
832
|
{
|
|
840
833
|
"id": "bandit-b407-import-xml-expat",
|
|
841
834
|
"document": "rules/bandit-b407-import-xml-expat.json",
|
|
@@ -896,12 +889,6 @@
|
|
|
896
889
|
"title": "Bandit B606: Start process with no shell",
|
|
897
890
|
"group": "Bandit"
|
|
898
891
|
},
|
|
899
|
-
{
|
|
900
|
-
"id": "bandit-b610-django-extra-used",
|
|
901
|
-
"document": "rules/bandit-b610-django-extra-used.json",
|
|
902
|
-
"title": "Bandit B610: Django extra used",
|
|
903
|
-
"group": "Bandit"
|
|
904
|
-
},
|
|
905
892
|
{
|
|
906
893
|
"id": "bandit-b615-huggingface-unsafe-download",
|
|
907
894
|
"document": "rules/bandit-b615-huggingface-unsafe-download.json",
|