Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fix::applicability to JSON output #4341

Merged
merged 1 commit into from
May 10, 2023
Merged

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented May 10, 2023

Add the Fix::applicability to the JSON output. I'll use the presence of the new field to detect whether this ruff version emits
one-based indices for edits or not.

Closes #4340

@MichaReiser
Copy link
Member Author

MichaReiser commented May 10, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link
Contributor

github-actions bot commented May 10, 2023

PR Check Results

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     17.1±0.08ms     2.4 MB/sec    1.01     17.3±0.10ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.0±0.01ms     4.1 MB/sec    1.01      4.0±0.02ms     4.1 MB/sec
linter/all-rules/numpy/globals.py          1.01   503.2±17.04µs     5.9 MB/sec    1.00    497.1±2.49µs     5.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.0±0.03ms     3.6 MB/sec    1.01      7.0±0.03ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.00      8.2±0.04ms     5.0 MB/sec    1.02      8.3±0.04ms     4.9 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1761.8±4.98µs     9.5 MB/sec    1.01   1770.9±5.47µs     9.4 MB/sec
linter/default-rules/numpy/globals.py      1.00    193.6±0.93µs    15.2 MB/sec    1.01    195.1±1.21µs    15.1 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.6±0.02ms     7.0 MB/sec    1.02      3.7±0.02ms     6.9 MB/sec
parser/large/dataset.py                    1.00      6.6±0.08ms     6.2 MB/sec    1.01      6.6±0.01ms     6.1 MB/sec
parser/numpy/ctypeslib.py                  1.00   1278.4±4.42µs    13.0 MB/sec    1.01   1296.4±3.64µs    12.8 MB/sec
parser/numpy/globals.py                    1.00    129.4±0.23µs    22.8 MB/sec    1.01    130.9±0.87µs    22.5 MB/sec
parser/pydantic/types.py                   1.00      2.8±0.00ms     9.2 MB/sec    1.01      2.8±0.01ms     9.0 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     16.7±0.40ms     2.4 MB/sec    1.00     16.7±0.14ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.2±0.02ms     3.9 MB/sec    1.00      4.2±0.04ms     3.9 MB/sec
linter/all-rules/numpy/globals.py          1.01    433.5±7.46µs     6.8 MB/sec    1.00    430.6±6.89µs     6.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.1±0.08ms     3.6 MB/sec    1.00      7.1±0.05ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.01      8.4±0.06ms     4.8 MB/sec    1.00      8.4±0.04ms     4.9 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1757.6±17.39µs     9.5 MB/sec    1.01  1767.6±13.59µs     9.4 MB/sec
linter/default-rules/numpy/globals.py      1.00    188.3±1.67µs    15.7 MB/sec    1.00    188.6±2.33µs    15.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.8±0.04ms     6.7 MB/sec    1.00      3.8±0.05ms     6.7 MB/sec
parser/large/dataset.py                    1.00      6.9±0.03ms     5.9 MB/sec    1.00      6.9±0.03ms     5.9 MB/sec
parser/numpy/ctypeslib.py                  1.00  1317.4±10.90µs    12.6 MB/sec    1.00  1314.8±10.27µs    12.7 MB/sec
parser/numpy/globals.py                    1.00    136.4±6.94µs    21.6 MB/sec    1.00    135.8±2.03µs    21.7 MB/sec
parser/pydantic/types.py                   1.00      2.9±0.02ms     8.7 MB/sec    1.00      2.9±0.02ms     8.7 MB/sec

Add the `Fix::applicability` to the JSON output.
I'll use the presence of the new field to detect whether this ruff version emits
one-based indices for edits or not.
@MichaReiser MichaReiser enabled auto-merge (squash) May 10, 2023 14:29
@MichaReiser MichaReiser merged commit ddbe5a1 into main May 10, 2023
@MichaReiser MichaReiser deleted the add-applicability-to-json branch May 10, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Applicability in JSON output
2 participants