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

Replace Formatter<PyFormatContext<'_>> with PyFormatter #6330

Merged
merged 1 commit into from
Aug 4, 2023
Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented Aug 4, 2023

This is a refactoring to use the type alias in more places. In the process, I had to fix and run generate.py. There are no functional changes.

This fixing and running generate.py
@konstin
Copy link
Member Author

konstin commented Aug 4, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

PR Check Results

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00      8.9±0.34ms     4.6 MB/sec    1.01      9.0±0.20ms     4.5 MB/sec
formatter/numpy/ctypeslib.py               1.01  1757.4±87.88µs     9.5 MB/sec    1.00  1748.6±90.17µs     9.5 MB/sec
formatter/numpy/globals.py                 1.00    196.4±7.58µs    15.0 MB/sec    1.02   199.5±10.29µs    14.8 MB/sec
formatter/pydantic/types.py                1.02      3.6±0.14ms     7.0 MB/sec    1.00      3.5±0.17ms     7.2 MB/sec
linter/all-rules/large/dataset.py          1.03     12.7±0.19ms     3.2 MB/sec    1.00     12.3±0.38ms     3.3 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.02      3.2±0.06ms     5.2 MB/sec    1.00      3.1±0.09ms     5.3 MB/sec
linter/all-rules/numpy/globals.py          1.04   439.2±10.63µs     6.7 MB/sec    1.00   422.3±21.78µs     7.0 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.6±0.13ms     4.5 MB/sec    1.01      5.7±0.13ms     4.5 MB/sec
linter/default-rules/large/dataset.py      1.03      6.0±0.17ms     6.8 MB/sec    1.00      5.8±0.21ms     7.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.01  1298.4±29.40µs    12.8 MB/sec    1.00  1283.9±28.44µs    13.0 MB/sec
linter/default-rules/numpy/globals.py      1.00    131.2±5.66µs    22.5 MB/sec    1.08    141.5±4.33µs    20.9 MB/sec
linter/default-rules/pydantic/types.py     1.00      2.6±0.13ms     9.9 MB/sec    1.05      2.7±0.07ms     9.5 MB/sec

Windows

group                                      main                                    pr
-----                                      ----                                    --
formatter/large/dataset.py                 1.00     10.2±0.78ms     4.0 MB/sec     1.03     10.6±0.83ms     3.8 MB/sec
formatter/numpy/ctypeslib.py               1.04      2.0±0.17ms     8.2 MB/sec     1.00  1959.6±124.21µs     8.5 MB/sec
formatter/numpy/globals.py                 1.01   234.5±18.99µs    12.6 MB/sec     1.00   233.2±21.51µs    12.7 MB/sec
formatter/pydantic/types.py                1.00      4.3±0.32ms     5.9 MB/sec     1.05      4.5±0.42ms     5.6 MB/sec
linter/all-rules/large/dataset.py          1.00     14.7±0.90ms     2.8 MB/sec     1.04     15.2±1.13ms     2.7 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.8±0.22ms     4.4 MB/sec     1.03      3.9±0.27ms     4.3 MB/sec
linter/all-rules/numpy/globals.py          1.00   479.7±32.16µs     6.2 MB/sec     1.01   482.5±37.42µs     6.1 MB/sec
linter/all-rules/pydantic/types.py         1.01      6.9±0.41ms     3.7 MB/sec     1.00      6.8±0.47ms     3.8 MB/sec
linter/default-rules/large/dataset.py      1.00      7.4±0.45ms     5.5 MB/sec     1.01      7.5±0.52ms     5.4 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.01  1589.4±124.28µs    10.5 MB/sec    1.00  1567.9±133.14µs    10.6 MB/sec
linter/default-rules/numpy/globals.py      1.00   191.4±14.09µs    15.4 MB/sec     1.00   191.2±15.88µs    15.4 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.3±0.24ms     7.8 MB/sec     1.01      3.3±0.23ms     7.7 MB/sec

@MichaReiser MichaReiser added the formatter Related to the formatter label Aug 4, 2023
@konstin konstin added the internal An internal refactor or improvement label Aug 4, 2023
@konstin konstin merged commit a48d16e into main Aug 4, 2023
17 checks passed
@konstin konstin deleted the Replace_with_ branch August 4, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants